[arch-general] Login Statistics Similar to Centos
bts at square-r00t.net
Fri Sep 1 18:42:31 UTC 2017
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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 898 bytes
Desc: OpenPGP digital signature
More information about the arch-general