Ubuntu – Ecryptfs-recover-private mounts wrong filesystem


I have a backup of my encrypted home directory on an external harddrive.

When I use ecryptfs-recover-private /mnt/externalhdd/home/user/.Private/ to mount the encrypted fs of the external hdd it creates a mount point in /tmp/… for it.

But not the ecryptfs of the external HDD is mounted there but my main ecryptfs (!).

Best Answer

ecryptfs-recover-private error handling is seriously lacking. My version has a bug where it returns success even when you give the wrong mount password. It also gives success when you try to mount just about any directory, regardless of whether it actually contains ecryptfs data or not.

Your problem is you are trying to do the obvious thing and mount home/username/.Private. That won't work! Instead, you need to mount home/.ecryptfs/username/.Private.

Try this:

ecryptfs-recover-private /mnt/externalhdd/home/.ecryptfs/user/.Private/

Follow the prompts and use the login passphrase for your old account, or the mount passphrase if you have it.

Once the mount is complete, you should be able to access the contents of your old account.