[systemd-devel] login/logout hooks in fedora 17?

Lennart Poettering lennart at poettering.net
Thu Jun 21 02:59:32 PDT 2012


On Wed, 20.06.12 21:26, Fernando Lopez-Lezcano (nando at ccrma.Stanford.EDU) wrote:

> Hi Lennart,
> 
> Thanks for the advice, sounds like the right solution[*]. I managed
> to get pam_script going. Right now it is at the end of postlogin in
> /etc/pam.d/ (after several earlier choices) and it works. Half of
> the time. Literally. The open session script triggers with a gdm
> login into a gnome session, but the close session script does not
> trigger with a logout.
> 
> But both scripts trigger on ssh logins and logouts. Systemd seems to
> to be happy (at least I see messages in dbus-monitor). But pam,
> somehow, does not get the right push when I logout of a gnome-shell
> session (this is all in fc17).
> 
> So, who is missing a message? (or whatever) Pam? Gnome-shell?
> Systemd? Another obscure little piece of the puzzle that I can't yet
> see?

Hmm, so if the PAM sessoin end hooks are not called then this would be a
bug in gdm. Did you check auth.log whether the session logout hooks log
anything there?

> [*] I also tested hacking dbus-monitor and I guess that could be
> made into a login/logout detector - but how do you differentiate
> between local and ssh logins? .../login1/Manager messages do not
> seem to be enough.

Local logins have a seat assigned, for ssh logins the seat is "".

But I think the PAM way is much preferable since it's synchronous...

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list