PAM mount : Monter des partages réseaux au login
From Deimos.fr / Bloc Notes Informatique
1 Introduction
You may need sometime to mount automatically some network shares. It could be done with the pam_mount module.
2 Installation
For installation :
apt-get |
apt-get install pam_mount |
3 Configuration
3.1 pam_mount.conf
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 :
/etc/security/pam_mount.conf |
volume * nfs my_nfs_server /home/& ~ - - - |
You may also need to have other mount points for other things like smb, cifs or fuse :
/etc/security/pam_mount.conf |
volume user smbfs krueger public /home/user/krueger - - - volume * fuse - "sshfs#&@fileserver:" /home/& - - - |
3.2 Application
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 :
Now when you'll login, it will automatically mount your home.