1

In the past, I installed Ubuntu 12.04 with /dev/sda4 mounted as /home. I encrypted my home directory.

Today, I erased all the partitions except /dev/sda4 and I installed Xubuntu 14.04 on a new partition (/dev/sda3). I did not mount /dev/sda4.

Then I used usermod to change my home directory from /home/jordan to /home-old/jordan. Then I mounted /dev/sda4 as /home.

Now I want to change my current home directory from /home-old/jordan to /home/jordan, keeping the original (encrypted) contents of /home/jordan.

How can I do this? (I know both the login password and the ecryptfs passphrase used to encrypt the old home directory.)

0

I'm not an expert in ecryptfs, but it looks to me like it should just work, if your password on the new system is the same as on the old system. Have you tried it?

If the passwords are not the same, you may need to rewrite /home/.ecryptfs/jordan/.ecryptfs/wrapped-passphrase but be sure to save a copy first! You can create a new wrapped passphrase with

ecryptfs-wrap-passphrase /home/.ecryptfs/jordan/.ecryptfs/wrapped-passphrase

It will ask two questions. First enter your ecryptfs passphrase (32-character hexadecimal string), then enter your new password. Of course this is after backing up the existing wrapped-passphrase file).

Again, I am not an expert and I have not tried this, so proceed at your own risk and discretion. The posting guidelines request I not post this opinion; however, I consider it an informed opinion, and no one else has answered.

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.