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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CMS ID last logon date

Status
Not open for further replies.

tonymans

Programmer
Sep 7, 2001
8
0
0
US
I'm trying to find a way to list the date of the last time a user id on cms was used

My exp with this is pretty limited but I have found info in chklastlog to display /var/adm/wtmp but this file doesnt have enough historical data to eliminate unused ids.

Does anyone know of a guide or tutorial where i can get this info?
 
There is a command "last" , but it uses the file you wrote about. So it shows only few last logins.
 
from teh command line:

who -u
 
who -u will only show you who is currently logged in.

I had to write a script to do this. The script uses the cat command to cat the passwd file in the etc directory, then for each login do a finger command to find out when they last logged in.

I'm trying to find the one I wrote so I can post it.

- Stinney

Favorite all too common vendor response: "We've never seen this issue before.
 
Sorry, you actualy should be able to do the command:

last

and get the information you are looking for.

The script I wrote was so I could export the information.

- Stinney

Favorite all too common vendor response: "We've never seen this issue before.
 
While looking for my original script found this nice little command line:

finger `sort /etc/passwd | cut -f1 -d":"` | grep -i log | more

Note: the ` mark before sort and after the ":" are back quotes usually next to the 1 key on your keyboard under the ~



- Stinney

Favorite all too common vendor response: "We've never seen this issue before.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top