On 09/01/2017 02:38 PM, William Gathoye wrote:
> I already did knew about this PrintLastLog feature but I wasn't aware
> this was PAM responsible of that (I thought this was sshd looking in
> wtmp or lastlog manually).
> 
> Btw, do you know how to achieve the same behavior but on TTY or in GUI
> opening a shell console (then added in the shell conf, like bashrc)? Do
> you think we need to parse the output of the "last" command manually, or
> do you have any other solution avoiding to reinvent the wheel?
> 

See my last reply. the lastlog stats will print for both TTY and SSH.
(From recollection, though, sshd's PrintLastLog is different from PAM's
lastlog printing.)

Anyways, no need to much about with bashrc. PAM itself prints the
lastlog if that module's loaded. I assume.

as for a desktop environment... that's a whole 'nother ballgame. You'd
want to hook into the messaging/notification system for the DE in that case.

-- 
brent saner
https://www.square-r00t.net

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to