logging all logins with periodic
Matthew Seaman
m.seaman at infracaninophile.co.uk
Thu Sep 2 09:41:55 PDT 2004
On Thu, Sep 02, 2004 at 03:34:25PM +0000, meads594 at comcast.net wrote:
> I'm currently running FreeBSD 4.10 on a machine at home. Since it is exposed to the internet (and since I am the only one who should be logging into it), I would like to have a summary log of all logins (both failed and successful).
>
> "periodic" shows the the failed logins in the daily summary, but I would also like a summary of the successful logins. I've "google"-ed, checked the list archives, and looked at the period.conf man page, but I can't seem to find a way to do what I want. However, I'm sure I'm not the first person to want this functionality.
>
> Can periodic be used to get a summary of successful logins? Is there a different utility that exists?
>
I don't think the periodic scripts have that capability. However,
it's fairly simple to get a list of all logins on the system (except,
for some unknown reason those logins via xdm(1) and similar graphical
login managers).
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.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040902/a395661b/attachment.bin
More information about the freebsd-questions
mailing list