[systemd-bugs] pam_systemd and kill-session-processes

Vladimir Elisseev vovan at vovan.nl
Sat Oct 20 01:05:52 PDT 2012


Hello!

I'm trying to use kill-session-processes=1 with pam_systemd, but
apparently it doesn't work. pam_systemd is called when user logged on:

Oct 20 09:26:18 xxxx sshd[20735]: pam_systemd(sshd:session): Reply from logind: id=30 object_path=/org/freedesktop/login1/session/30 runtime_path=/run/user/1005 session_fd=10 seat= vtnr=0

but there's nothing when user logged out and "loginctl session-status
30" shows "State: closing":
30 - test (1005)
           Since: Sat, 20 Oct 2012 09:26:18 +0200; 11min ago
          Leader: 20735
             TTY: ssh
          Remote: xxxxx.net.home
         Service: sshd; type tty; class user
           State: closing
          CGroup: name=systemd:/user/test/30
                  ├ 20843 SCREEN
                  └ 20844 zsh
 

I'm using systemd version 193. The pam configuration is bellow:
auth            required        pam_env.so 
auth            required        pam_unix.so
auth        optional    pam_ssh.so try_first_pass nullok debug
auth        optional    pam_sss.so use_first_pass
 
account         required        pam_unix.so 
account     optional    pam_sss.so use_first_pass


password        required        pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3 
password        required        pam_unix.so try_first_pass use_authtok nullok sha512 shadow
password    optional    pam_sss.so use_authtok use_first_pass
 
session         required        pam_unix.so 
session     required    pam_loginuid.so
session         required        pam_limits.so 
session         required        pam_env.so 
session         optional    pam_systemd.so kill-session-processes=1 debug=1
session     optional    pam_ssh.so
session     optional    pam_sss.so use_first_pass
session         optional        pam_permit.so


Any ideas?

Regards,
Vlad.



More information about the systemd-bugs mailing list