How to set up Home directory encryption in Ubuntu 11.04
Install ecryptfs-utils
sudo apt-get install ecryptfs-utils
ecryptfs-setup-private
Enter your account password and then passphrase. Your passphrase is different from your login.
Logout, and Log back in to establish the mount
sudo apt-get install ecryptfs-utils
ecryptfs-setup-private
Enter your account password and then passphrase. Your passphrase is different from your login.
Logout, and Log back in to establish the mount
Accessing your encrypted folder from Live CD, another machine or as a secondary drive.
You first need to establish the secondary drive in working order. You can try to mount it in readonly mode to protect your data from any accidents.
sudo mkdir /media/sda1
sudo mount /dev/sda1 /media/sda1
sudo mount -o remount,ro /dev/sda1 (for remounting it as readonly)
sudo ecryptfs-recover-private /media/sda1/home/user/.Private
[sudo] password for kamran: ******
INFO: Searching for encrypted private directories (this might take a while)...
INFO: Found [/media/sda1/home/.ecryptfs/user/.Private].
Try to recover this directory? [Y/n]: y
INFO: Enter your LOGIN passphrase...
Passphrase: *********
INFO: Searching for encrypted private directories (this might take a while)...
INFO: Found [/media/sda1/home/.ecryptfs/user/.Private].
Try to recover this directory? [Y/n]: y
INFO: Enter your LOGIN passphrase...
Passphrase: *********
Inserted auth tok with sig [5cd9a631a570b201] into the user session keyring
INFO: Success! Private data mounted read-only at [/tmp/ecryptfs.9KYHQHjv/private].
You should now be able to access all data from /tmp/ecryptfs.9KYHQHjv/private
INFO: Success! Private data mounted read-only at [/tmp/ecryptfs.9KYHQHjv/private].
You should now be able to access all data from /tmp/ecryptfs.9KYHQHjv/private
Copy your data to a new location
rsync -av /tmp/ecryptfs.9KYHQHjv/private/ /home/newuser