I tried to configure PAM automount to auto-mount Samba shares on user login in KDM. However, KDM does not seem to invoke PAM in a way that the auto-mounts are triggered. What I did: I added two cifs devices to /etc/security/pam_mount.conf.xml: <pam_mount> <debug enable="0" /> <volume uid="1000-10000" pgroup="examplegroup" fstype="cifs" server="exampleserver" path="homes" mountpoint="/exampleserver/%(USER)" /> <volume uid="1000-10000" pgroup="examplegroup" fstype="cifs" server="exampleserver" path="credativ" mountpoint="/home/examplecommonuser" /> <mntoptions deny="*" /> <path>/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin</path> <logout wait="1" hup="1" term="1" kill="1" /> <mkmountpoint enable="1" remove="0" /> </pam_mount> I checked the PAM settings for KDM, but they seem fine: $ cat /etc/pam.d/kdm # # /etc/pam.d/kdm - specify the PAM behaviour of kdm # auth required pam_nologin.so auth required pam_env.so readenv=1 auth required pam_env.so readenv=1 envfile=/etc/default/locale @include common-auth @include common-account session required pam_limits.so @include common-session @include common-password The mount option is supplied in common-auth and common-session: $ grep mount /etc/pam.d/* /etc/pam.d/common-auth:auth optional pam_mount.so /etc/pam.d/common-session:session optional pam_mount.so This setup works with other login managers - but not with KDM. Reproducible: Always Steps to Reproduce: 1. Enter a PAM automount configuration to PAM common-auth, common-session and /etc/security/pam_mount.conf.xml . 2. Reboot machine, log into user. 3. See that the cifs paths are not mounted. Actual Results: The cifs paths are not mounted. Expected Results: The paths should be mounted automatically. When I fire up konsole and log in myself again in the running session (su - $USER) I am asked for the PAM mount password on the shell. Actually I do exactly that to workaround the problem right now.
KDM is unmaintained and not used in KDE Plasma 5. SDDM is the login manager used in KDE Plasma 5. If you still have this same issue with SDDM, please file an issue on the SDDM bugtracker (after doing a search for existing issues first!): https://github.com/sddm/sddm/issues/