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 am trying to reinstall, but I want to backup my encrypted home first, so I booted up from a live CD, mounted the hard drive, ran sudo ecryptfs-recover-private <home directory here> and it asked for my passphrase. I entered it, said it was successful and mounted it it in "/tmp/ecryptfs.somethingsomething" . I go there, using a root nautilus, and double click on the .desktop entry, and it just spawns a terminal window that instantly vanishes. I checked the readme file and it says that its running ecryptfs-mount-private, so when I run that in terminal myself, it says "ERROR: Encrypted private directory is not setup properly".

I've googled around and cannot find an answer, since it tells you to recover it using ecryptfs-recover-private, but that obviously isn't' working...

share|improve this question
    
I'm not sure that's the best way to go about it. How about backing up to another encrypted (USB or internal SATA) drive from your current install? Then after reinstalling you just enter the password and transfer everything back? This is what I do and it works perfectly. –  Tom Brossman Jan 9 '12 at 10:05
    
I can't even get the drive to mount, so even if i do that i would have to eventually set it up again to auto unlock every time i log in (which i would much rather be done for me), but if i cant even get the drive to mount because ecryptfs-recover-private or ecryptfs-mount-private doesn't work, then either solution wont work.... –  mgrandi Jan 9 '12 at 16:20
    
Guess I'm confused. You said you are 'trying to reinstall, but I want to backup my encrypted home first'. The normal way of doing this is backup=>reinstall=>restore. Did you reinstall before backing up? If yes, you may have lost some or all of your data, depending on your partitioning scheme. If no, what is the exact step in the process you are stuck at? I'd like to help but I don't have a good understanding of the problem. –  Tom Brossman Jan 9 '12 at 19:55
    
i haven't reinstalled yet. its a very old version of ubuntu that i have been upgrading since and i want to get a fresh install. I have an external 1tb drive that i just want to copy all of my files on my encrypted home directory to, reinstall to my main hard drive , and then copy all my files back over. But i can't seem to access said encrypted files. The guy who wrote ecryptfs says to use the command ecryptfs-recover-private in his blog post here: blog.dustinkirkland.com/2011/04/… , but its not working due to the error i posted originally. –  mgrandi Jan 10 '12 at 16:20

1 Answer 1

up vote 6 down vote accepted

I figured out my problem. I was running the command and giving it my HOME directory, and for some reason it was saying it was successful in mounting it. However, it was lying. Turns out you need to run the command with the .Private folder that each user has, its located in

/home/.ecryptfs/<username>/.Private

The command is supposed to recurse and find that folder for you, but I was impatient and gave it my home folder. I'm not sure why it said it was successful when it clearly wasn't, but if you give it that .Private folder, and then enter your login password, it should mount it to a folder inside /tmp/ and you can do whatever else you want to do with the data =)

share|improve this answer

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.