Ubuntu – How to stop using built-in home directory encryption

ecryptfsencryption

I have a new Ubuntu 10.04 installation with encrypted home directory (using the built-in encryption offered by Ubuntu installer).

What's the easiest way to stop using encryption? (I.e., to decrypt my home directory permanently.)

(It's giving me problems with kernel updates, and I'd just like to cut down on all the hassle I'm having with this installation.)

Best Answer

Googling around, I found this post:

Not to bring up an old thread but in case anyone has errors trying to follow these instructions, here is what I did.

  1. Backup the home directory while you are logged in sudo cp -rp /home/user /home/user.backup

    1.1. Check that your home backup has everything!!!

  2. reboot into root via grub
  3. Delete your home directory rm -rf /home/user
  4. Remove the packages apt-get remove ecryptfs-utils libecryptfs0
  5. Restore your home directory mv /home/user.backup /home/user
  6. reboot
  7. Remove any of those .Private .ecryptfs folders rm -rf ~/.Private rm -rf ~/.ecryptfs
  8. Yay!
This worked for me. Home folder file permissions stay intact and does not bugger up Dropbox or git repos. Some reason my fresh install on Ubuntu 9.10 would not do the first command. Just make sure you think the process through when using rm -rf. Just wanted to post this not only for my record, but anyone else who encounters problems.

Some notes

  • reboot into root via grub was a bit unclear to me; I didn't reboot, just switched to using root (another user account with sudo privileges would work equally well).
  • Before removing the packages ecryptfs-utils and libecryptfs0 would work, I needed to remove /home/.ecryptfs/<myusername>. (It complained that ecryptfs-utils was in use.)

Other than that, this worked for me. It's far from simple though, so feel free to post better solutions!

Related Question