Time of last login for users

April 29, 2005 at 02:27:32
Specs: AIX, ?

I would like a script to give me username and last login as a date.
So far, using lsuser -a time_last_login in a script I can produce a file with lines giving Username time+last_login=nnnnnnnnnn

How can I make the script produce a date instead of the long number

See More: Time of last login for users

Report •

April 29, 2005 at 02:34:04

Forgot to say some users have never logged in so on their line in the file I only get the username

Report •

April 29, 2005 at 08:55:05

'lsuser' must be an AIX specific command. I've never heard of it. How about showing an example of what:


looks like. Maybe somebody can help.

Have you considered using the 'finger' command? It's probably more portable.



Report •

May 4, 2005 at 02:16:29

To get information on user SMITH I use
lsuser SMITH

To get just the last login time I use
lsuser -a time_last_login SMITH

which produces
SMITH time_last_login=1111222233

I'd like to know when users last logged in as a
date so that I can get rid of users who haven't logged in before a certain date.

Report •

Related Solutions

Ask Question