How to stop using built-in home directory encryption?
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.
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
- 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!!!
- reboot into root via grub
- Delete your home directory
rm -rf /home/user
- Remove the packages
apt-get remove ecryptfs-utils libecryptfs0
- Restore your home directory
mv /home/user.backup /home/user
- reboot
- Remove any of those
.Private
.ecryptfs
foldersrm -rf ~/.Private
rm -rf ~/.ecryptfs
- Yay!
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
andlibecryptfs0
would work, I needed to remove/home/.ecryptfs/<myusername>
. (It complained thatecryptfs-utils
was in use.)
Other than that, this worked for me. It's far from simple though, so feel free to post better solutions!
Here you are, hope this helps (see ecryptfs-setup-private(1)
):
$ ecryptfs-setup-private --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:
Obtain your Private directory mountpoint
$ PRIVATE=`cat ~/.ecryptfs/Private.mnt 2>/dev/null || echo $HOME/Private`
Ensure that you have moved all relevant data out of your
$PRIVATE
directoryUnmount your encrypted private directory
$ ecryptfs-umount-private
Make your Private directory writable again
$ chmod 700 $PRIVATE
Remove
$PRIVATE
,~/.Private
,~/.ecryptfs
Note: THIS IS VERY PERMANENT, BE VERY CAREFUL
$ rm -rf $PRIVATE ~/.Private ~/.ecryptfs
Uninstall the utilities (this is specific to your Linux distribution)
$ sudo apt-get remove ecryptfs-utils libecryptfs0
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:
Obtain your Private directory mountpoint
PRIVATE= cat ~/.ecryptfs/Private.mnt 2>/dev/null || echo $HOME/Private
Ensure that you have moved all relevant data out of your
$PRIVATE
directoryUnmount your encrypted private directory
ecryptfs-umount-private
Make your Private directory writable again
chmod 700 $PRIVATE
Remove
$PRIVATE
,~/.Private
,~/.ecryptfs
Note: THIS IS VERY PERMANENT, BE VERY CAREFULrm -rf $PRIVATE ~/.Private ~/.ecryptfs
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 :]