Need to copy files from an old home encrypted with ecryptfs? Whether you’re doing it off a livecd or a new installation, at least in Ubuntu 14.04 it’s simple.
First, install ecryptfs-recover-private
$ sudo apt-get install ecryptfs-recover-private
Now, ensure the device you want to recover from is mounted:
/dev/sdXY is the device e.g. /dev/sda1
$ sudo mount /dev/sdXY /mnt/old-home
Now you need to point ecryptfs-recover-private to the disk’s /home/.ecryptfs/<your-user>/.Private. e.g.:
$ sudo ecryptfs-recover-private /mnt/old-home/home/.ecryptfs/errietta/.Private
Just follow the prompt from the previous command.
If wrapped-passphrase is existant in the directory, you will be prompted for your login passphrase. Otherwise, (or if you forgot your login passphrase) you need to have the encryption key that was created when first setting up ecryptfs.
INFO: Found [.../.ecryptfs/errietta/.Private]. Try to recover this directory? [Y/n]: Y INFO: Found your wrapped-passphrase Do you know your LOGIN passphrase? [Y/n] Y INFO: Enter your LOGIN passphrase... Passphrase: Inserted auth tok with sig [...] into the user session keyring INFO: Success! Private data mounted at [/tmp/ecryptfs.2eLhj8mU].
Voilá! You now have access to your old home in the directory mentioned in the last line of that command