SEARCH

How-To Geek

How to Disable Home Folder Encryption After Installing Ubuntu

image

Ubuntu offers to encrypt your home directory during installation. The encryption has some drawbacks – there’s a performance penalty and recovering your files is more difficult. If you change your mind later, you can remove the encryption without reinstalling Ubuntu.

The process of removing the encryption involves creating a backup copy of your home directory without encryption, deleting the existing home directory, removing the encryption utilities, and moving the unencrypted copy back into place.

Back Up Your Home Directory

Your home directory is available to you in unencrypted form while you’re logged in, so you can easily create an unencrypted backup copy.

To create the backup copy, launch a terminal while you’re logged in and run the following command, replacing user with your username:

sudo cp -rp /home/user /home/user.backup

(The -rp options here tell cp to copy the directory recursively – that is, copy everything inside it – and to preserve the file ownership and permission information.)

image

Open the /home/user.backup directory on your system and verify that the backup was created successfully. All your files should be there. It’s always a good idea to have an additional backup, too – just in case.

image

Switch User Accounts

You can’t remove the encryption while you’re logged in, so you’ll have to switch to a different user account first. The simplest way to do this is by creating another user account with administrator (sudo) privileges. To create another user account, click your name on the panel and select User Accounts.

image

Create a new user account with the Administrator account type.

image

Set a password for the user account. You won’t be able to log in as the other user account until you set a password.

image

Log out from the panel after creating the other user account.

image

Select your temporary user account on the login screen and log in.

image

Remove Encryption

Once you’re logged in as the other user account, fire up a terminal and run the following command to delete your current, encrypted home directory. Be sure you have a backup before deleting the home directory! And be careful when running sudo rm -rf commands – these can quickly delete important files if you’re not careful.

sudo rm -rf /home/user

(Remember to replace user with your username.)

image

Delete the .ecryptfs folder in your backup folder. The encryption utilities won’t uninstall until you delete this folder.:

sudo rm -rf /home/user.backup/.ecryptfs

image

Next, remove the encryption utilities from your system:

sudo apt-get remove ecryptfs-utils libecryptfs0

image

Finally, restore the unencrypted backup of your home directory to its original location:

sudo mv /home/user.backup /home/user

image

Your home directory is now unencrypted. You can log out (or restart your system) and log in normally. You may want to delete the temporary user account from the User Accounts window.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 06/9/12

Comments (4)

  1. Heartinpiece

    Great Tip!
    But there’s got to be a better solution!

    What if I want to disable encryption on user A, and leave encryption on user B?

    uninstalling the packages is probably going to mess up, or disable encryption on User B right?
    wouldn’t there be a way to reconfigure the encryption packages?

  2. mazxst

    I do not know why but it is impossible to install Ubuntu without warning or same goes to other one .. does anyone know good installation guide for version 12 ? how the hell I do know what ext4 or one stuff I need to use .. and they vay ubuntu is most easiest version //// plus pagefile stuff ..

    if ubuntu can fix this things they can get lot of users. hate it or like it most easiest operating system to use is windows.

    plus most things in ubuntu is command based ….. and in new one where the hell is system monitor .. it is not supposed to hidden in a cave .. look windows very easy and very easy to find.

  3. Issa

    I have been suffering from a folder encryption, and not being able to restore my files because I don’t know what the password is. I am going to try this method soon. Thank you!

  4. Chris Hoffman

    @Heartinpiece

    I’m not sure if you can enable/disable on a per-user basis — this will get you to the point where you’d be if you installed Ubuntu without enabling encryption, though

Enter Your Email Here to Get Access for Free:

Go check your email!