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

Time of last login for users

Reply to Message Icon

Original Message
Name: Strikerlight
Date: April 29, 2005 at 02:27:32 Pacific
Subject: Time of last login for users
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


Report Offensive Message For Removal


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

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


Report Offensive Follow Up For Removal

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

'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


Report Offensive Follow Up For Removal

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

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 Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Time of last login for users

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge