logging all logins with periodic
keramida at ceid.upatras.gr
Thu Sep 2 12:36:31 PDT 2004
On 2004-09-02 17:41, Matthew Seaman <m.seaman at infracaninophile.co.uk> wrote:
> On Thu, Sep 02, 2004 at 03:34:25PM +0000, meads594 at comcast.net wrote:
> > Can periodic be used to get a summary of successful logins? Is there
> > a different utility that exists?
> The command to use is last(1) -- note by default that reads
> /var/log/wtmp which is recycled each month via newsyslog(8). You can
> edit the /etc/daily.local script to get that output included in your
> daily e-mails.
$ last | grep "$(date '+%b %e')"
giorgos ttyv1 Thu Sep 2 22:07 still logged in
toor ttyv0 Thu Sep 2 22:06 still logged in
toor ttyv0 Thu Sep 2 08:39 - shutdown (02:11)
More information about the freebsd-questions