Comment 3 for bug 881466

Revision history for this message
Damjan Georgievski (gdamjan) wrote :

Also related to this, the way lightdm does PAM is problematic with SystemD.

I'm starting lightdm as a service from SystemD but as soon as I login, my session is killed.

From auth.log I can see that I did successfully login, but the session is killed imidiatelly:
auth.log:Feb 23 23:43:04 localhost lightdm: pam_unix(lightdm:session): session closed for user lightdm
auth.log:Feb 23 23:43:04 localhost lightdm: pam_unix(lightdm:session): session opened for user damjan by (uid=0)
auth.log:Feb 23 23:43:04 localhost lightdm: pam_unix(lightdm:session): session closed for user damjan

also attached is lightdm.log

I've asked on the systemd irc channel, their suggestion is that "it opens the pam session before forking, which is wrong, since systemd-logind will think the greeter itself is the session's controlling process, so it will kill the session when the greeter exits ... pam_open_session should be called from the new process, not from the daemon"