I am using pam_mount to mount cifs and sshfs shares for users when they log in to an Arch Linux workstation. I have the a volume line in /etc/security/pam_mount.conf.xml:<volume user=strongbad fstype=fuse path=sshfs#%(USER)@myserver.com: mountpoint=/mnt/%(USER) options=idmap=user,password_stdin />Everything works great on log in and I get an entry in /proc/mounts:strongbad@myserver.com: /mnt/strongbad fuse.sshfs rw,nosuid,nodev,relatime,user_id=1002,group_id=1002 0 0The problem is the shares do not get unmounted when the user logs out. I hae tried logging in with both KDE/KDM and directly to a TTY. I get the same error in the system logs no matter how I log in:systemd[474]: (pam_mount.c:706): received order to close thingssystemd[474]: (pam_mount.c:538): * PAM_MOUNT WAS INVOKED WITH INSUFFICIENT PRIVILEGES (euid=1002)systemd[474]: (pam_mount.c:539): * THIS IS A BUG OF THE CALLER. CONSULT YOUR DISTRO.systemd[474]: (pam_mount.c:540): * Also see bugs.txt in the pam_mount source tarball/website documenTaking a look at bugs.txt uninformatively, at least to me, says:== su, probably others  privilege drop ==I sometimes get reports about unmount failing because of insufficient privileges. 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. (May not apply for FUSE mounts.)Known constellations includesu from coreutils, on some distrosGDM on UbuntuThis seems to describe my problem. Am I doing something wrong? Is Arch broken? Are there any distributions where pam_mount is actually able to unmount shares on logout?
Unmounting shares on logout with pam_mount
arch linux;pam;unmounting