2

I accidently deleted my /usr/lib folder. I had the genius idea of rebooting to see if it still boots. Suprise, it doesn't. My home directory is encrypted and I don't remember the encryption phrase.

However I can boot into a root terminal and access my files. From there I can even log into my account. So as far as I know you don't need the encryption pw if you are logged into the account that encrypted the files. But for some Reason I still only see the "Access-Your-Private-Data.desktop" file in the /home/MYUSER/ . And also when I run the command: "ecryptfs-recover-private" I'm asked for a recovery passphrase.

All that, even though I'm logged in to my user that encryped the files. Once my UI was still working I never had to enter the recovery phrase.

Is there any way to get back my data without knowing the encryption key but just my User name?

1

You should always backup your encryption passphrase and create a separate backup on an external hd ...

Anyway, I think you didn't delete the key itself. You deleted the encfs libraries.

find /usr/lib/ | grep encfs
/usr/lib/libencfs.so.6
/usr/lib/libencfs.so.6.0.2
/usr/lib/libencfs.so

Your encryption key sould be at:

/home/$USER/.ecryptfs

or

/home/.ecryptfs/$USER/.ecryptfs

You need to boot from a live system, mount the home partition with your encrypted home.

For recovery use:

sudo ecryptfs-recover-private

It should find the encrypted home, you only need the login password. Make an external backup after recovery and reinstall your system.

0

Ok I found a way to recover it. Unfortunately most commands to restore the encryption key or installing packages didn't work from the machine as there were no packages at all. I also used another machine to try accessing the encryption key at /home/$USER/.ecryptfs but I got an error that the key was corrupted.

At the end I installed the same linux version on a new partition, mounted the old one and copied the whole /usr/lib folder of the new installation to the one I crashed.

After that I was able to boot into my system again and I could decrypt all my files with the user password.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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