Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

4 Answers

up vote 32 down vote accepted

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!

share|improve this answer
    
I'll accept this as it worked for me, but like I said, feel free to post something simpler or better! –  Jonik Oct 6 '10 at 13:33
2  
This worked for me on 12.10 aswell. I also needed to delete /home/.ecryptfs/<myusername> first. Also, I had to remount / in the root console though, but I guess this is another story. Thanks! –  Constantinius Nov 29 '12 at 9:41
    
Worked on 12.04 too. The only thing is if you switch to root (sudo su) instead of "rebooting to root via grub" it works but you need to move out of /home/user (cd /home for example) and issue umount /home/user to unmount the home dir before using the rm -rf. You also need to rm -rf /home/user.backup/.ecryptfs before removing the 2 packages. –  laurent Dec 9 '12 at 21:35
1  
+1 This is easier to do over SSH, no GRUB to deal with or trying to avoid any mounting. Just be careful deleting /home/.ecryptfs. Apparently it has a symlink pointing to /home/username. I lost all my data. –  htoip Feb 17 '13 at 23:10
add comment

Here you are, hope this helps:

$ [ecryptfs-setup-private][1] --undo

The output claims:

In the event that you want to remove your eCryptfs Private Directory setup, you will need to very carefully perform the following actions manually:

1. Obtain your Private directory mountpoint
    $ PRIVATE=`cat ~/.ecryptfs/Private.mnt 2>/dev/null || echo $HOME/Private`

2. Ensure that you have moved all relevant data out of your $PRIVATE directory

3. Unmount your encrypted private directory
    $ ecryptfs-umount-private

4. Make your Private directory writable again
    $ chmod 700 $PRIVATE

5. Remove $PRIVATE, ~/.Private, ~/.ecryptfs
    Note: THIS IS VERY PERMANENT, BE VERY CAREFUL
    $ rm -rf $PRIVATE ~/.Private ~/.ecryptfs

6. Uninstall the utilities (this is specific to your Linux distribution)
    $ sudo apt-get remove ecryptfs-utils libecryptfs0
share|improve this answer
    
Thanks. I already got it solved, but I guess this is useful for others. –  Jonik Oct 21 '10 at 10:40
    
@Jonik Were you able to log into .ecryptfs/jonik/.Private properly after the kernel update, or did you back up and undo encryption? –  isomorphismes Aug 13 '11 at 1:21
add comment

1st thing to do : BACKUP YOUR HOME I can't say it louder... basically undoing encryption is equivalent to resetting (rm -rf) your home, which is in fact hidden by a mount.

2nd step : log out of any desktop manager and go to a virtual console (CTRL-ALT-F1)

Finally : for details :

ecryptfs-setup-private --undo

In the event that you want to remove your eCryptfs Private Directory setup, you will need to very carefully perform the following actions manually:

  1. Obtain your Private directory mountpoint

PRIVATE=cat ~/.ecryptfs/Private.mnt 2>/dev/null || echo $HOME/Private

  1. Ensure that you have moved all relevant data out of your $PRIVATE directory
  2. Unmount your encrypted private directory

ecryptfs-umount-private

  1. Make your Private directory writable again

chmod 700 $PRIVATE

  1. Remove $PRIVATE, ~/.Private, ~/.ecryptfs Note: THIS IS VERY PERMANENT, BE VERY CAREFUL

rm -rf $PRIVATE ~/.Private ~/.ecryptfs

  1. Uninstall the utilities

sudo apt-get remove ecryptfs-utils libecryptfs0

I would say step 5 is a bit wrong : there's no need to delete $PRIVATE, which was for me my home....

After .Private and .ecryptfs deletion, just restore your home :]

share|improve this answer
1  
What if you've encrypted more than half of your hard disk space? Is there any way out, without buying another drive? –  isomorphismes Aug 13 '11 at 1:17
add comment

Jonik explanation works well. But instead of step 2, I did:

  1. Logout
  2. Press Ctrl+F4. A command line interface should open.
  3. Login as root
  4. rm -rf .ecryptfs

Then, instead of step 6: Press Ctrl+F7. If your GUI login screen does not appear, press Ctrl+F8.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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