Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify users not logging in ....

Status
Not open for further replies.

vivek1712

Technical User
Dec 17, 2002
47
IN
#!/bin/sh
trap "rm -f $$.1 $$.2 ; echo Program interrupted ; exit" 1 2 15
last | cut -f 1 -d " " > $$.1
lsuser ALL | cut -f 1 -d " " > $$.2
sort -u +0.0 -0.8 -tx $$.1 -o $$.1
sort +0.0 -0.8 -tx $$.2 -o $$.2
diff $$.2 $$.1 | grep &quot;<&quot; | cut -c 2- | more
rm $$.1 $$.2
 
Hi,
#!/bin/sh
trap &quot;rm -f $$.1 $$.2 ; echo Program interrupted ; exit&quot; 1 2 15
last|cut -f 1 -d &quot; &quot;|sort -u > $$.1
cat /etc/passwd|cut -f 1 -d &quot;:&quot;|sort -u > $$.2
grep -x -v -f $$.1 $$.2
rm $$.1 $$2
Regards Boris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top