How to encrypt your home folder in Ubuntu or Linux Mint After Installation using ecryptfs

In case you want forgot to encrypt your home folder while installing Linux Mint or Ubuntu, it’s very easy to do that afterwards, and I’ll KISS, i.e. Keep It Simple & Stupid 🙂

  1. login normally at the login screen, let’s say the user you want to encrypt its home folder is called “hobba”
  2. Create a new administrative user, let’s call it “olla” for instance
  3. Now logout from “hobba” and login as “olla”
  4. Make sure the /home partition (if any) has enough free space, as ecryptfs takes a backup copy of all your files
  5. Run this command “sudo ecryptfs-migrate-home -u hobba”
  6. Preferably just enter the same login password you currently use for the user “hobba”. If not, you’ll have to change your user’s login password again.
  7. Wait till the command finishes execution
  8. You will see this information displayed, it is VERY IMPORTANT to follow point number 1, you can execute the others if you wish:
    Some Important Notes!

    1. The file encryption appears to have completed successfully, however,

    2. If test can log in and read and write their files, then the migration is complete,
    and you should remove /home/user.7y3X0vjM.
    Otherwise, restore /home/user.7y3X0vjM back to /home/test.

    3. user should also run ‘ecryptfs-unwrap-passphrase’ and record
    their randomly generated mount passphrase as soon as possible.

    4. To ensure the integrity of all encrypted data on this system, you
    should also encrypted swap space with ‘ecryptfs-setup-swap’.
  9. You’re done!
  10. Enjoy 🙂


About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Uncategorized and tagged , , , , . Bookmark the permalink.

2 Responses to How to encrypt your home folder in Ubuntu or Linux Mint After Installation using ecryptfs

Leave a Reply to SutoCom Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s