[systemd-devel] pam_systemd.so and su

Lennart Poettering lennart at poettering.net
Wed Mar 21 16:41:37 PDT 2012


On Sun, 18.03.12 16:08, Canek Peláez Valdés (caneko at gmail.com) wrote:

> Hi; I'm using systemd 43 in Gentoo, and I usally have this line at the
> end of /etc/pam.d/system-auth:
> 
> -session        optional        pam_systemd.so
> 
> When I use su to become root, after logout the following message appears:
> 
>  ...killed.
> 
> Not always, but most of the time. Without the line with
> pam_systemd.so, the message never appears.
> 
> So, two questions:
> 
> 1. Why is my session being killed at logout time?
> 
> 2. The pam_systemd.so is really necessary? The "...killed." message
> appears after two or three seconds, and it's slightly annoying.

Which version of systemd is this? (If it isnt 44, please upgrade first,
then try to reproduce this)

Do you have audit enabled in the kernel and are using pam_loginuid?

Normally, when the pam session close hooks are called logind responds to
this by killing the main process of the session if it still
exists. This is probably the source of the problem here.

I understood correctly that besides the "su killed" message everything
behaves correctly? i.e. the commands within the su are fully executed,
only su itself is called, right?

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list