passwd -S on linux- what are the fields?

Thread Tools Search this Thread
# 1  
passwd -S on linux- what are the fields?

I'm looking for some documentation on what the different fields mean in the output of passwd -S username:

passwd -S foo
foo PS 2012-03-20 0 70 3 -1 (Password set, MD5 crypt.)

I think the date given is the date of the last password change, the 0 after that is the minimum password age, and the 49 after that is the maximum password age. But I can't find any documentation to confirm this. I'd also like to know what the stuff that appears in the other fields means.

The man page says "This will output a short information about the status of the password for a given account. Available to root user only.", which is, shall we say, less than helpful.
# 2  
man passwd

I suppose it may depends from the distrib but it should be more or less something like (Ubuntu here)

f1 : name of the account
f2 : account is locked (L)
account has a usable passwd (P)
account has no password (NP)
f3 : date of last passwd modification
f4: minimum duration before modification
f5: maximum duration of validity
f6: duration of warning
f7: autorized duration of inactivity (-1 = endless)
(all duration are in days)
# 3  
From my own manual page:

       -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.


# Login name
# usasble password
# Date of last password change
# Minimum age
# Maximum age
# Warning period
# Inactivity period
# ???
(Password set, MD5 crypt.)


Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Science: Mathematics
Difficulty: Medium
E = MC3
True or False?

10 More Discussions You Might Find Interesting

1. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

2. UNIX for Dummies Questions & Answers

How to extract fields from etc/passwd file?

Hi! i want to extract from /etc/passwd file,the user and user info fileds, to a another file.I've tried this: cut -d ':' -f1 ':' -f6 < file but cut can be used to extract olny one field and not two. maybe with awk is this possible? (4 Replies)
Discussion started by: strawhatluffy
4 Replies

3. Shell Programming and Scripting

Cut fields from /etc/passwd file into variables?

The script must ask the user to enter the user name and check whether the user exists in /etc/passwd (you must allow the partial usernames also). If the username exists, display the details as: List of users Login Name: User ID: ... (3 Replies)
Discussion started by: nobletechnology
3 Replies

4. Linux

ssh and passwd scripting execution problems on linux

I'm having a problem here and I was wondering if anyone could help me? I'm putting together a password script. First off, I don't have root access. I have sudo access. Lets say the User ID is Trevor1, the password is H!rry23! and the server name is Linux1234 This is how the script begins ... (5 Replies)
Discussion started by: wdog17
5 Replies

5. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

6. Shell Programming and Scripting

awk sed cut? to rearrange random number of fields into 3 fields

I'm working on formatting some attendance data to meet a vendors requirements to upload to their system. With some help on the forums here, I have the data close. But they've since changed what they want. The vendor wants me to submit three fields to them. Field 1 is the studentid field,... (4 Replies)
Discussion started by: axo959
4 Replies

7. Shell Programming and Scripting

Script for updating the comments field on /etc/passwd on redhat linux

Hi there, I have more that 300 servers that I need to updated the comments field on /etc/passwd for users that have a blank comments fields. The users have accounts on different servers. I have created a list of these users on a text file called update_passwd.txt. I need a script that will... (6 Replies)
Discussion started by: Linux Duke
6 Replies

8. UNIX for Advanced & Expert Users

Linux PAM:passwd: how many character validate

Helo I m using PAM module on linux system I have one strange problem. I have create user and assigned group using my own function. I m giving more than 8 character password. Now when I enter upto 8 character then also it will accept. In short It validate only first 8 character. can U tell... (4 Replies)
Discussion started by: amitpansuria
4 Replies

9. Shell Programming and Scripting

how to extract fields for /etc/passwd

hi, i would like to extract the just name field from /etc/passwd file, and nothing else. ie grep pauline, and Pauline Fowler comes back. cheeers paul mc (6 Replies)
Discussion started by: mopimp
6 Replies

10. BSD

comparable command in OpenBSD for linux's "passwd -l (name)"

i'm trying to get a samba server up and running. however, there is no argument in OpenBSD's "passwd" command that i know of that will allow the following: -l This option is used to lock the specified account and it is available to root only. The locking is performed by... (1 Reply)
Discussion started by: xyyz
1 Replies

Featured Tech Videos