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'm using encrypted home directories, and in my day to day activities, I have two user accounts I switch between, one for personal stuff, one for work stuff. However, it's fairly common that I need to access personal files for work stuff, or vice versa.

So, how can I set up automatically mounting the other directory at login? I use the same password for both, so the system should be able to access to the encryption keys at login time. I've done a bit of googling, and I can't even figure out where the config files for this are...

share|improve this question

2 Answers 2

Steps to decrypt a user folder can be found in this discussion thread:

http://ubuntuforums.org/showthread.php?p=11107254

Once you have the encryption key for the second directory in your keyring, you could execute this on login:

sudo mount -t ecryptfs /home/user/.Private /home/user/Private

and the second directory would be available at /home/user/Private

share|improve this answer

i believe the encrypted home is unlocked with your login password but only through the gnome-keyring the actual password for the home folder is a rather long randomly generated password

i've never done it but it should be able to unlock it using this long password and save that to your keyring this command will get you the long passphrase

ecryptfs-unwrap-passphrase ~/.ecryptfs/wrapped-passphrase

you will have to do this logged in as the other user

then this should add it to your keyring

ecryptfs-insert-wrapped-passphrase-into-keyring

do this logged in as the other user taking not of the unwrapped passphrase in the first command

i've never done any of this so it would be a good idea to have a look over the man pages first

also make a note of both of the wrapped passphrase aswell just incase when you add it to the keyring it removes your passphrase not sure if it will store 2

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.