LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Understanding output of passwd -S (https://www.linuxquestions.org/questions/linux-newbie-8/understanding-output-of-passwd-s-4175523683/)

JockVSJock 10-29-2014 08:38 AM

Understanding output of passwd -S
 
I Googled around for this before posting here. I was suprised not to find any answer.

Have a user account locked out and I was able to unlock it (passwd -u username) and then force them to change their passwd in 60 days (chage -M 60 username). The user tells me that they still can't get it.

I checked the man page before doing anything with their password and found the command passwd -S

Here is the output

Code:

username PS 2014-10-27 1 60 7 -1 (Password set, SHA512 crypt.)
I understand the username

The date is when the passwd was last set

The number 60 is from the chage -M 60 command

I'm not sure what PS is or means. I think the first number 1 is tied to Mimimum number of days between password change and the number 7 is tied to number of days of warning before password expires. The same info from chage -l username, correct?

What is the -1 for?

grubby 10-29-2014 08:57 AM

You need to work on your google skills. :) This was the first link when googling for "passwd -S"

http://www.unix.com/unix-for-dummies...at-fields.html

Quote:

-S, --status
Display account status information. The status information consists
of 7 fields. The first field is the user's login name. The second
field indicates if the user account has a locked password (L), has
no password (NP), or has a usable password (P). The third field
gives the date of the last password change. The next four fields
are the minimum age, maximum age, warning period, and inactivity
period for the password. These ages are expressed in days.

JockVSJock 10-29-2014 09:38 AM

Quote:

Originally Posted by grubby (Post 5261353)
You need to work on your google skills. :)


Thanks, we all search differently.


All times are GMT -5. The time now is 08:19 PM.