Re: [Nolug] login monitor

From: Brad Bendily <brad_at_selu.edu>
Date: Thu, 21 Oct 2004 15:10:33 -0500 (CDT)
Message-ID: <Pine.LNX.4.44.0410211503310.26767-100000@cliffy.selu.edu>

> >> Does anyone have ideas or pointers how to monitor user logons and set
> >> system to immediately e-mail about it?
> >
> > Depend on shell, the /etc/profile (bash) or /etc/csh.cshrc (*csh) gets run
> > upon user login. Add something like
> >
> > echo "$USER logged in" | mail -s'User login' you@somewhere.com
> >
> > to those files.

You could also run a command from cron that will look in /var/log/messages
for something on this line:
sshd[14352]: Accepted password for brad from ::ffff:xxx.xxx.xxx.xxx port
32839 ssh2

somethign like
grep "Accepted password" /var/log/messages

of course with this you'll get the same list over and over...

bb

___________________
Nolug mailing list
nolug@nolug.org
Received on 10/21/04

This archive was generated by hypermail 2.2.0 : 12/19/08 EST