Re: Login Statistics Similar to Centos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux