Re: Need script to extract from /etc/security/lastlog -> list of users and their la
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > Re: Need script to extract from /etc/security/lastlog -> list of users and their la




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Re: Need script to extract from /etc/security/lastlog -> list of users and their la  
Dan


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 08:00 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register