ecryptfs-setup-private
encrypted private directory setup
TLDR
Setup encrypted private directory
SYNOPSIS
ecryptfs-setup-private [options]
DESCRIPTION
ecryptfs-setup-private creates an encrypted private directory for a user. It sets up ~/Private as an encrypted folder that is automatically mounted when the user logs in and unmounted on logout.
The setup creates the necessary encryption keys and wrapper, storing them in ~/.ecryptfs. The mount passphrase is wrapped with the login password, enabling automatic decryption on login.
PARAMETERS
--wrapping
Use login passphrase for wrapping.--noautomount
Don't configure automount on login.--nopwcheck
Don't verify login password.--force
Overwrite existing configuration.-u, --username name
Specify username (for root use).-l, --loginpass pass
Login passphrase (insecure, for scripting).-m, --mountpass pass
Mount passphrase (insecure, for scripting).
CONFIGURATION
~/.ecryptfs/
Directory containing encryption keys, wrapped passphrases, and mount configuration.~/.ecryptfs/wrapped-passphrase
Mount passphrase wrapped with login password for automatic decryption.
SETUP PROCESS
1. Prompts for login password
2. Generates random mount passphrase
3. Wraps mount passphrase with login password
4. Creates ~/.Private (encrypted) and ~/Private (mount point)
5. Configures PAM for auto-mount
CAVEATS
Requires eCryptfs kernel module. Swap should be encrypted for security. Login password changes require rewrapping. Recovery requires unwrapped passphrase. Deprecated in favor of fscrypt on modern systems.
HISTORY
This utility was developed for Ubuntu's encrypted home directory feature. It was widely used for per-user encryption from Ubuntu 8.10 through 18.04, after which fscrypt became the recommended solution.
