Computing.Net > Forums > Unix > Time of last login for users

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Time of last login for users

Reply to Message Icon

Name: Strikerlight
Date: April 29, 2005 at 02:27:32 Pacific
OS: AIX
CPU/Ram: ?
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Strikerlight
Date: April 29, 2005 at 02:34:04 Pacific
Reply:

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


0

Response Number 2
Name: nails
Date: April 29, 2005 at 08:55:05 Pacific
Reply:

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

time+last_login=nnnnnnnnnn

looks like. Maybe somebody can help.

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

Regards,

Nails


0

Response Number 3
Name: Strikerlight
Date: May 4, 2005 at 02:16:29 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Time of last login for users

ftp help www.computing.net/answers/unix/ftp-help/6668.html

Command for status of last command www.computing.net/answers/unix/command-for-status-of-last-command/8181.html

script to get the files created on recent sat www.computing.net/answers/unix/script-to-get-the-files-created-on-recent-sat/8422.html