-1

I accidentally enabled /home encryption on installation. So I need to decrypt it manually from console after every system start. I do it with ecryptfs-umount-private. How can I make the decryption automatically at startup?

  • I edited the text and title to read "decrypt" instead of "encrypt" since this is what I assume you meant. Correct me if I'm wrong. – Kusalananda Jul 9 '18 at 11:40
  • @Kusalananda yes, you're right – mend4x Jul 10 '18 at 6:50
2

You could decrypt it permanently, using :

this post (inspired by this other post) :

  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

    OR you could just switch to using root (another user account with sudo privileges would work equally well).

  3. Delete your home directory rm -rf /home/user
  4. Remove /home/.ecryptfs/<myusername>

    Then 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.

  • it seems pretty cool. can I backup my '/home' directory and then restore it on newly installed system? – mend4x Jul 10 '18 at 6:52
  • If you create a brand new install, you should create a user with the same username than before (it will add data (user name, password hash,...) to the /etc/shadow file). Then, using the root, restore the /home directory. It should work IMO, but I haven't tested it yet (while the above solution has been tested). In any case, if you already have some important data file (your work, photos,...) in your home, it'd safe to back it up on a separate device. – Cedric Jul 10 '18 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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