Bug 322702 - PAM-Automount of Samba shares does not work with KDM
Summary: PAM-Automount of Samba shares does not work with KDM
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: 4.10.2
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-22 16:53 UTC by Roland Wolters
Modified: 2018-04-16 20:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roland Wolters 2013-07-22 16:53:23 UTC
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.
Comment 1 Nate Graham 2018-04-16 20:22:18 UTC
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/