Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am on Ubuntu 12.10 with one user using encrypted home.

A while back I have changed by user password and then forgot it.

I then made a backup of my files using Dustin's help to an external drive. I was about to delete my system and do a fresh install when I realized that there is a recovery option in which I can reset my user password. Using How do I reset a lost administrative password? I have set a new password for my user.

After rebooting I can log-in in Unity using my new password but I am thrown back to the Unity screen immediately. (No message about false password)

Using the terminal I can log in using the new user-password.

How can I re-enable my machine to decrypt my ecrypfs encrypted home with the unwrapped passphrase I know?

share|improve this question
add comment

3 Answers 3

Follow the instructions from this link.

Hope it helps

http://unixtitan.net/main/2010/11/16/annoyance-changing-password-with-ecryptfs/

share|improve this answer
2  
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  guntbert May 17 '13 at 19:47
    
@guntbert was right as the page you referred to is down :) –  Tomasz Zieliński Sep 21 '13 at 15:17
add comment

based on grayfox May 17 at 19:28 - http://unixtitan.net/main/2010/11/16/annoyance-changing-password-with-ecryptfs/ (i dont have enough reputation to comment his answer)

I had the exact same problem. Changed my password using 'passwd', messed things up because of encrypted home directory. The above link contains a solution:

login to terminal

$ ecryptfs-mount-private

You need to know your old password to mount.

This will unlock and mount your /home/$USER. At this point, we can access /home/$USER. So just cd back into it and run…

$ ecryptfs-rewrap-passphrase ~/.ecryptfs/wrapped-passphrase

It’ll prompt you for your old password, and you can enter a new one afterwards. You will need to change the password for your keyring as well. From your menu bar – [Applications] => [Accessories] => [Passwords and Encryption Keys] Under Passwords tab – right click “Passwords: login” and “Change Password”

credits to http://unixtitan.net !

share|improve this answer
add comment

if home directory is encrypted, you should not change your password using the passwd command.

If someone forgets their login password, and home directory is encrypted, you should not try to reset it with the methods listed in other sites, such as manual editing of /etc/shadow or sudo passwd user using a different account, etc etc.

Indeed if you do, then your new login password will not decrypt your home directory, and you will see that behaviour you describe : at graphical login the password is accepted, but then the user is immediatly kicked out, since the home dir cannot be decrypted and accessed.

It seems you were wise enough to have a stored copy of the unwraped ecryptfs password. In that case there are ecrypt tools to solve the problem . See http://blog.dustinkirkland.com/2011/04/introducing-ecryptfs-recover-private.html

People who did not store it, and do not remember the old login password, may have a look into this http://mennucc1.debian.net/shadow_crack/

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.