pam_systemd delays SSH login - required?

https://askubuntu.com/questions/470236/pam-systemd-delays-ssh-login-required

Asked 11 years, 7 months ago Modified 9 years, 1 month ago Viewed 14k times 3

On our Saucy servers (13.10) we are seeing long delays when logging into the systems via SSH. I figured out it is related to the line

session optional pam_systemd.so in /etc/pam.d/common-session.

When I comment that line, login is immediate.

The /var/log/auth.log output that accompanies any delayed login attempts looks like this:

May 21 17:33:58 control02 sshd[18488]: Accepted publickey for daniel.schneller from 10.102.2.9 port 35763 ssh2 May 21 17:33:58 control02 sshd[18488]: pam_unix(sshd:session): session opened for user daniel.schneller by (uid=0) May 21 17:34:23 control02 sshd[18488]: pam_systemd(sshd:session): Failed to create session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. I could not find any definite documentation yet whether or not I need the module at all. I could, of course, leave it commented out, because it seems to only wait for a timeout anyway at the moment, but I would rather understand the underlying cause and fix that, if at all possible, to prevent problems down the road.

Updated: