You are not logged in.

#1 2014-05-15 13:43:09

daniel_shub
Member
Registered: 2012-06-21
Posts: 81

[SOLVED] Insufficent privledges to unmount shares with pam_mount

I am using pam_mount to automatically mount shares (both cifs and sshfs) of users on login. During login everything works fine and the shares are mounted. During logout I get an error/warning that

PAM_MOUNT WAS INVOKED WITH INSUFFICENT PRIVILEDGES. (EUID=1002)
THIS IS A BUG OF THE CALLER. CONSULT YOUR DISTRO

The pam_mount documentation (http://sourceforge.net/p/pam-mount/pam- … gs.txt#l93) unhelpfully says

Some programs and/or distributions and/or pam configurations seem to drop the root privileges after successful authentification. This goes counter to pam_mount which needs these privileges for umount.

Is Arch one of these distributions? How do I get pam_mount to umount the shares when the user logs out?

Last edited by daniel_shub (2014-05-16 12:07:08)

Offline

#2 2014-05-16 12:06:39

daniel_shub
Member
Registered: 2012-06-21
Posts: 81

Re: [SOLVED] Insufficent privledges to unmount shares with pam_mount

Arch appears to be one of these distributions since it includes pam_systemd in the PAM login stack (https://bugs.archlinux.org/task/27259) and despite the complaints of pam_mount, this is probably a good thing. The key is to correctly configure the PAM login stack. Instead of modifying /etc/pam.d/system-auth I just added

auth     required   pam_mount.so
auth     required   pam_unix.so use_first_pass
session  optional   pam_mount.so
session  required   pam_unix.so

to /etc/pam.d/login and everything works fine.

Offline

Board footer

Powered by FluxBB