Subject: Re: Last users today
To: Iggy Drougge <optimus@canit.se>
From: Greg A. Woods <woods@weird.com>
List: netbsd-users
Date: 01/22/2002 20:19:50
[ On , January 22, 2002 at 01:26:41 (+0100), Iggy Drougge wrote: ]
> Subject: Last users today
>
> I'd like to add a section to my daily security output, listing all users who
> have, or are, logged in during the day. Unfortunately, there doesn't seem to
> be any facility in last(1) for that. How would I go about solving this in a
> simple way? It might even be an area of future improvement in last. =)

Assuming you have newsyslog configured to roll your wtmp file over at
midnight, but not to compress it, and that /etc/daily runs sometime
after midnight, then adding the following to /etc/daily.local will do
the trick:

	/usr/sbin/ac -d -w /var/log/wtmp.0

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>