PAM mount : Monter des partages réseaux au login
You may need sometime to mount automatically some network shares. It could be done with the pam_mount module.
For installation :
apt-get install pam_mount
Edit the /etc/security/pam_mount.conf file and configure what you need. Here we would like users to have nfs home share to be mounted from the server at logon. Add this line at the end of the file :
volume * nfs my_nfs_server /home/& ~ - - -
You may also need to have other mount points for other things like smb, cifs or fuse :
volume user smbfs krueger public /home/user/krueger - - - volume * fuse - "sshfs#&@fileserver:" /home/& - - -
You must choose an application to mount automatically your share. For example I choose SSH. When a user logs into SSH it must mount the NFS share, so edit this file :
... auth required pam_env.so envfile=/etc/default/locale auth required pam_mount.so @include common-auth ... @include common-account session required pam_mount.so @include common-session ...
Now when you'll login, it will automatically mount your home.