Multiple logins with pam_mount means multiple (redundant) mounts ...
Posted
by Jamie
on Server Fault
See other posts from Server Fault
or by Jamie
Published on 2010-04-23T19:24:21Z
Indexed on
2010/04/23
19:33 UTC
Read the original article
Hit count: 269
I've configured pam_mount.so
to automagically mount a cifs share when users login; the problem is if a user logs into multiple times simultaneously, the mount command is repeated multiple times.
This so far isn't a problem but it's messy when you look at the output of a mount
command.
# mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
//srv1/UserShares/jrisk on /home/jrisk type cifs (rw,mand)
//srv1/UserShares/jrisk on /home/jrisk type cifs (rw,mand)
//srv1/UserShares/jrisk on /home/jrisk type cifs (rw,mand)
I'm assuming I need to fiddle with either the pam.d/common-auth
file or pam_mount.conf.xml
to accomplish this.
How can I instruct pam_mount.so
to avoid duplicate mountings?
© Server Fault or respective owner