01-18-05 10:56 PM
I wanted something similar, that used only native base AIX/ksh
commands, and that sorted output in reverse chrono sequence.
The idea was mine; the final working version was achieved with the
generous help of Paul Landay at us.ibm.com
#!/bin/ksh
UIDS=`last | cut -f1 -d' ' | cat -n | sort -k 2.1 | uniq -f1 | sort
-n | cut -f2`
for UID in $UIDS
do
last -1 $UID
done
I chose to name it "who.last". It leaves a bit to be desired in column
alignment, etc. occasionally, but is good enough to see the last time
users (including other sysadmins) were in (provided you don't allow
remote login directly to root, of course.)
Apologies for the google groups, our organization has let our newsfeed
subscription lapse.
Dan Goodman
[ Post a follow-up to this message ]
|