libpam-mount automounts SMB shares at login, just like Windows
Posted on Mon, 8th October 2007 at 20:00 under Eureka!, Coding, LinuxNow my
Method follows.
- sudo apt-get install libpam-mount
- read the docs under /usr/share/doc/libpam-mount/
- sudoedit /etc/pam.d/gdm to append
@include common-pammount - sudoedit /etc/security/pam_mount.conf to enable the luserconf setting and append
roto the options_allow setting - create file .pam_mount.conf in home directory containing:
volume username smbfs servername Music ~/Music nosuid,nodev,ro - - - sudo /etc/init.d/gdm restart
Libertus said: October 9th, 2007 at 19:11
Hmph… but not reliable. Didn’t auto-mount on my first login this evening, but did the next time. The error message left in /var/log/auth.log was the enigmatic “pam_mount(pam_mount.c:480) mount of Music failed”. So on goes debugging mode. sudoedit /etc/security/pam_mount.conf and change the debug setting to 1.
ReplyLibertus said: October 10th, 2007 at 20:51
Automatic mount worked first time this evening so the debug log doesn’t show anything useful yet.
Reply