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 puzzled.

As far as I understand it, the user folder /home/user is encrypted with the users password. Connecting through smb to the computer does somehow decrypt the user's folder. How is this done? SMB doesn't transfer the password normally.

Also, I'm trying to achieve something similar using pam_mount, but there are some limitations. What software does ubuntu use to mount its encrypted file systems?

share|improve this question

If you're meaning the eCryptfs home directory encryption, then the reason it is available is because the kernel keeps the user's home directory encryption key in memory for as long as the user is logged in (as defined by a PAM "session"). Specifically, the software that handles this is pam_ecryptfs. See its use in /etc/pam.d/common-*.

share|improve this answer
That's what I mean. But... where does the encryption key get passed to the kernel? Samba doesn't send the password over the network. – Georg Schölly Oct 31 '10 at 17:48
The eCryptfs mount will only be available if the user has already authenticated to PAM on the system. So, either they are already logged in, or Samba has been configured to use PAM (in which case the password is being sent over the network in some way). – Kees Cook Oct 31 '10 at 17:54
Actually you were right. I must have left open an SSH session that I missed. After rebooting it didn't work anymore. Thanks for your help! – Georg Schölly Oct 31 '10 at 18:33
up vote 1 down vote accepted

Actually I was wrong. I forgot to close an SSH session, of course the home folder was still decrypted.

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.