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" ** Attachment added: "log file" https://bugs.launchpad.net/lightdm/+bug/881466/+attachment/2776997/+files/lightdm.log -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to lightdm in Ubuntu. https://bugs.launchpad.net/bugs/881466 Title: Run PAM code inside session process Status in Light Display Manager: Triaged Status in “lightdm” package in Ubuntu: Triaged Status in “lightdm” source package in Precise: Triaged Bug description: Currently PAM code is run inside the main lightdm daemon process. This means that buggy PAM modules can crash lightdm (see bug 829221). We should change the architecture to run the PAM code inside the session processes before launching the user session. To manage notifications about this bug go to: https://bugs.launchpad.net/lightdm/+bug/881466/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp