so I am testing installation with an encrypted home. One drawback of encryption is that it's harder to recover your files in case of a system crash. So before venturing further, I wanted to test and find the methodology to be able to read my encrypted home with a live USB. That turned out much harder than I thought.
I will describe the things I have tried, maybe someone will be able to point out mistakes.
In the install I did, not only is the home encrypted, it's also on a separate partition, maybe that can explain some of my difficulties.
So I booted my live USB (LM18.1 Cinnamon, I checked the ISO and the integrity of the medium). Then I first followed instructions from howtogeek which tell to mount the partition, open a terminal and issue
Code: Select all
sudo ecryptfs-recover-private
Code: Select all
INFO: Searching for encrypted private directories (this might take a while)...
find: ‘/run/user/999/gvfs’: Permission denied
find: File system loop detected; ‘/sys/kernel/debug/pinctrl’ is part of the same file system loop as ‘/sys/kernel/debug’.
Next thing I tried was to directly mount the private data, so I mounted the /home, cd to it, then
Code: Select all
sudo mount -t ecryptfs fabien/ fabien/
Code: Select all
Access-Your-Private-Data.desktop README.txt
Next I adapted instructions from https://www.cyberciti.biz/faq/ubuntu-mo ... om-livecd/, mixed with chroot instructions from https://sites.google.com/site/easylinuxtipsproject/6. sdb2 was the / and sdb3 the /home of the installed system (the computer has another internal hard drive sda that I'm not using at the moment), so I did
Code: Select all
sudo mount /dev/sdb2 /mnt
sudo mount /dev/sdb3 /mnt/home
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
chroot /mnt
root@mint / #
following the instructions of the cyberciti link, I tried switching to my user
Code: Select all
# su fabien
open: Permission denied
Error locking counter
fabien@mint ~ $
, and whoami
returned "fabien".Full of hope I issued the final command
Code: Select all
$ ecryptfs-mount-private
Enter your login passphrase:
Inserted auth tok with sig [blabla] into the user session keyring
open: Permission denied
Error locking counter
$ ls /home/fabien/
Access-Your-Private-Data.desktop README.txt
I also tried
sudo mount -a
to mount the fstab, still there is only Access-Your-Private-Data.desktop README.txt
in my home.Only thing that worked is that, still being chrooted, I issued
Code: Select all
$ sudo ecryptfs-recover-private
sudo: unable to resolve host mint: Connection refused
[sudo] password for fabien:
INFO: Searching for encrypted private directories (this might take a while)...
INFO: Found [/home/.ecryptfs/fabien/.Private].
Try to recover this directory? [Y/n]: Y
INFO: Found your wrapped-passphrase
Do you know your LOGIN passphrase? [Y/n] Y
INFO: Enter your LOGIN passphrase...
Passphrase:
Inserted auth tok with sig [blabla] into the user session keyring
INFO: Success! Private data mounted at [/tmp/ecryptfs.blabla2].
Code: Select all
$ ls /tmp/ecryptfs.blabla2/
Desktop Documents Downloads Music Pictures Public Templates Videos
Now that's quite a long and complicated route. Did I go wrong somewhere ?
Edit:fixed typos, added references I used