Sort users in /etc/passwd by timestamp of last password reset
is it possible to sort users in /etc/passwd by timestamp of the last time their password was reset?
|
Of course no, as no timestamp is registered in this file.
Unless yours have a specific format that includes it. If yes, please tell us what is this format. |
try this:
passwd -S <User_Name> To use against /etc/passwd i guess you can create a small script to loop and use in conjunction with the passwd -S My system has this output: <user_name> PS 1998-06-01 0 99999 7 -1 (Password set, MD5 crypt.) Which means last password change for the user was June 1, 1998. |
Thanks. Is that the timestamp when the account was created or when the password was last set?
|
Quote:
Code:
man passwd |
All times are GMT -5. The time now is 03:58 PM. |