baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

Elementary OS: disable ecryptfs home folder encryption, or: manually mounting ecryptfs encrypted homedir (e.g. from backup)

UPDATE – Better, easier way taken from http://askubuntu.com/questions/4950/how-to-stop-using-built-in-home-directory-encryption

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 single user mode via grub (shift during boot, edit, add “single” as a parameter. for details see https://www.cyberciti.biz/faq/grub-boot-into-single-user-mode/)
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. Remove any of those .Private .ecryptfs folders rm -rf ~/.Private rm -rf ~/.ecryptfs
7. reboot

Worked for me.

—————————————
OLD POST:

Change to the directory /[backup-mountdir]/home/.ecryptfs/[yourusername]/.Private/

then:

sudo ecryptfs-recover-private .

This might take several quite long! *) – Example output:

frank@t450s:~/fileserver/home/.ecryptfs/frank/.Private$ sudo ecryptfs-recover-private .
INFO: Found [.].
Try to recover this directory? [Y/n]: 
INFO: Found your wrapped-passphrase
Do you know your LOGIN passphrase? [Y/n] 
INFO: Enter your LOGIN passphrase...
Passphrase: 
Inserted auth tok with sig [54ae46ba02e2e46f] into the user session keyring
INFO: Success!  Private data mounted at [/tmp/ecryptfs.0NRS2Wbr].

*) due to the script design of /usr/bin/ecryptfs-recover-private it does a:

ls "$d/ECRYPTFS_FNEK_ENCRYPTED"* >/dev/null 2>&1 && fnek="--fnek" || fnek=

you can replace/patch this into

fnek="--fnek"
or (if you are not using encrypted filenames)
fnek=""

and it will speed up the script startup time.

Comments are currently closed.