Andy Zbikowski (Zibby) wrote:
>Does anyone know of a script/program that will generate some sort of
>report (basically just run last on every user in passwd) from the wtmp
>log?
>
>Seems like it would be something someone has done before. :)
>  
>
I'm not exactly sure what you are looking for specifically.  However, if 
you want a list of all the users in /etc/passwd, and their logins, you 
can do it like this:
#!/bin/bash
last > /tmp/last
for name in `cut -d: -f1 /etc/passwd`
do
    awk  /^$name/ /tmp/last
done
--
Brent Metzler
brent at bmetzler.org
AIM: bmetzl1999