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?
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-*
.Actually I was wrong. I forgot to close an SSH session, of course the home folder was still decrypted.