Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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


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


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.