Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I accidently deleted the .ecryptfs folder, also the .private folder. Cant login anymore. Just as guest. How can I restore to the system before I deletetd those fodlers?

share|improve this question

1 Answer 1

Did you record your randomly generated mount passphrase? It would be 16 or 32 characters of [0-9a-f]. If you have that long, random passphrase, it's relatively easy to recover. If you don't have that, there's no chance of recovery.

If you have your randomly generated mount passphrase, you'll recreate your .ecryptfs directory.

mkdir $HOME/.ecryptfs
ecryptfs-add-passphrase --fnek
[enter your long, random mount passphrase]
keyctl list @u
[add the two key fingerprints to $HOME/.ecryptfs/Private.sig]
ecryptfs-wrap-passphrase $HOME/.ecryptfs/wrapped-passphrase
echo $HOME > $HOME/.ecryptfs/Private.mnt
share|improve this answer
    
I only can log in as Guest. Im not allowed to make a directory. Sudo doesnt work. It says: unable to change to sudoers gid –  Bangal Apr 22 '12 at 15:56
    
You'll need to boot the system from a live cd, then. –  Dustin Kirkland Apr 22 '12 at 16:25
    
Thank you for your help. When I enter ecryptfs-wrap-passphrase $HOME/.ecryptfs/wrapped-passphrase I get Error: Wrapping passphrase failed [-5] Info: Check the system log for more information from libecryptfs –  Bangal Apr 22 '12 at 17:21
1  
I don't recommend doing this from live CD. You can still login as your normal user using the Console (Ctrl+Alt+F1) –  jP_wanN Apr 22 '12 at 19:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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