All files gone in 16.04 after adding write privileges to home

by Toby   Last Updated July 08, 2018 08:02 AM

After epically failing to reinstall a printer driver, I can no longer see my files in 16.04. The rough steps that I took to get to this point are

  1. Attempting to re-install cups Print jobs held, and after manually releasing them, they return to being held. and running

  2. Deleting the .Private file to free some additional space to re-install cups

  3. Getting stuck in an infinite login loop

  4. Adding write privileges to home per Ubuntu 16.04 Login Loop Problem

Now all my files are gone and I am sad. Is there any way to recover them?



Answers 1


It seems you have deleted something from your encrypted filesystem. Don't panic. Load Ubuntu from Live USB. Mount partition where your encrypted home directory reside (from Nautilus for example). Assume the home directory mounted to /media/ubuntu/myHome. Then try in terminal:

ecryptfs-unwrap-passphrase /media/ubuntu/myHome/.ecryptfs/toby/.ecryptfs/wrapped-passphrase

You'll be asked for your user password and then you'll see your encryption real passphrase - copy and save it to a text file. Next run:

sudo ecryptfs-add-passphrase --fnek

You'll see two lines with Inserted auth tok with sig with something in square brackets like this [7897fd8789g7dfg] - copy and save it to text file. We'll need second of signatures in square brackets. Next make directory:

sudo mkdir /media/ubuntu/decryptedHome

and run

sudo mount -t ecryptfs /media/ubuntu/myHome/.ecryptfs/toby/.Private/ /media/ubuntu/decryptedHome/

You'll be asked for some questions - allow default answers except file names decryption - allow file names encrypted and when you'll be asked for files names passphrase enter second key from square brackets [].

If everything was OK you'll see your home directory files in /media/ubuntu/decryptedHome/ directory.

Wiking
Wiking
July 08, 2018 08:00 AM

Related Questions


Ubuntu18.04.1 LTS gets stuck in a login loop

Updated September 28, 2018 12:02 PM




cupsd using 100% CPU, creating large (80GB+) error_log

Updated October 07, 2017 10:02 AM