[Howto] resolve pam-systemd login error

posted in: computer | 0

Debian error message (/var/log/auth.log)

pam_systemd(login:session): pam-systemd initializing
Jun 28 02:53:26 debian login[3173]: pam_systemd(login:session): Asking logind to create session: uid=1000 pid=3173 service=login type=tty class=user desktop= seat= vtnr=0 tty=/dev/tty1 display= remote=no remote_user= remote_host=
Jun 28 02:53:26 debian systemd: PAM no modules loaded for `systemd-user' service
Jun 28 02:53:26 debian systemd-logind[514]: New session 13 of user foo.
Jun 28 02:53:26 debian login[3173]: pam_systemd(login:session): Failed to create session: Start job for unit user@1000.service failed with 'failed'
Jun 28 02:53:26 debian login[3173]: System error
Jun 28 02:53:26 debian systemd-logind[514]: Removed session 13.

 

solution:

dbus-daemon must be running, because systemd needs it for communicating with logind.

/etc/init.d/dbus status (or stop, start)

 

apt-get install dbus libpam-systemd
loginctl enable-linger <username>
shutdown -r now