Recover encrypted home folder after reinstallation

Yesterday I did a fresh installation of Ubuntu 14.10 over Ubuntu 14.04 and now I am not able to decrypt my home folder. I had two separate partitions: / and /home.

I formatted my / partition but kept my /home partition. Now I am not able to log in to my account. I get following error:

signature not found in user keyring perhaps try the interactive 'ecryptfs-mount-private'.

When I try ecryptfs-mount-private command, it tells me that my login passphrase is wrong. I am using my password as my login passphrase. I haven't changed my password for a long long time, and my current password is same as my old password. So I am not sure why it is not working. When I try ecryptfs-verify -p command, it tells me that the configuration is invalid with error:

ERROR: Mount point [/home/$USER] is user's home
ERROR: Configuration invalid

While ecryptfs-verify -h doesn't give any error. What am I doing wrong? I did save my mount passphrase as well but when I try to use it from live usb using ecryptfs-recover-private, I get success but the mounted directory is still encrypted.


I was finally able to decrypt my home folder and recover my data. These are the steps I followed:

  1. Renamed my old home folder from /home/$USER to /home/$USER_old
  2. Created a new home folder using mkhomedir_helper command
  3. Logged in GUI mode (before I was not able to log in because my home folder was not getting decrypted)
  4. Checked if I can unwrap my old wrapped-passphrase file using the same password I was trying before:

ecryptfs-unwrap-passphrase /home/$USER_old/.ecryptfs/wrapped-passphrase

and voila, now I am able to unwrap it which I was not able to do before, neither when I was logged in text mode nor when I was trying to do it from live USB! And it turns out that the mount passphrase I had saved was not the same as the one wrapped in wrapped-passphrase file! And now that I look into it, the wrapped-passphrase file was changed just last month although I have been using the same login password for years! Anyway...

  1. Now that I have correct mount passphrase, to decrypt and mount my home folder, I just followed the steps listed in this answer: https://askubuntu.com/a/36783/271868

Test this:

Switch on your computer.

Press and hold the Shift key.

In the Grub menu select the line which starts with ---- Advanced options.

Select the line ending with --- recovery mode.

Your PC should display a menu with a number of options, select --- Drop to root shell prompt.

In a terminal run:

mount -o remount,rw /
mount --all
mount -t ecryptfs /home/user_name/.Private /home/user_name/Private

Your data encrypted in /home/user-name/.Private should be decrypted and mounting to /home/user_name/Private