Ubuntu – How does home folder encryption work

ecryptfsencryption

Back when Ubuntu first sported home folder encryption (what, around the time of Jaunty Jackalope?), I opted in. That caused me some grief when I decided to change my login password. I found that I couldn't decrypt my home anymore! In trying to fix this, I eventually muddled things to the point that using my old password didn't work anymore, either.

That experience has left me very shy of using an encrypted home directory–nevermind the performance hit of encryption. Has this feature become more "stable" since it came out? Does it break if you change your login password? Has your [more recent] experience been better? (Does it work in Natty Narwhal?)

Best Answer

It should be stable.

Password changes should not be a problem with one caveat: you need to use a user level password change tool (e.g. from the About Me window, or running the command line passwd tool without root privileges).

The encryption keys used for home folder encryption are themselves encrypted with your password. The normal password change process requires you to enter both your original and new passwords, so is able to re-encrypt these keys seamlessly. If you instead use an administrative password change (i.e. one that doesn't require your existing password), then this is not possible.

As expected, if you forget your existing password, you will lose access to your files if you have encrypted your home directory.