Contents
What are the fields of the password file?
The /etc/passwd file is a colon-separated file that contains the following information:
- User name.
- Encrypted password.
- User ID number (UID)
- User’s group ID number (GID)
- Full name of the user (GECOS)
- User home directory.
- Login shell.
What is the main security reason for implementing shadow passwords on a Unix system?
To reduce the vulnerability of a world-readable password file, many newer Unix systems use shadow password files.
What does in etc shadow?
Traditional Unix systems keep user account information, including one-way encrypted passwords, in a text file called “/etc/passwd”. A second file, called “/etc/shadow”, contains encrypted password as well as other information such as account or password expiration values, etc.
What’s the meaning of NP in the shadow file?
NP means that password authentication will always fail, but other login methods may succeed. You can set an account in this state with passwd -N. This differs from *LK* (reported as LK by passwd -s), which disables all logins to the account regardless of the authentication method.
What’s the meaning of NP and up in the password?
Confusingly, when passwd -s sees NP in /etc/shadow, it reports NL, whereas NP in the passwd -l report indicates that the account is open to all winds: users will be authenticated without even getting a password prompt (this is indicated by an empty password field in /etc/shadow ).
Where does the shadow file store the password?
The /etc/shadow file stores actual password in encrypted format (more like the hash of the password) for user’s account with additional properties related to user password. Basically, it stores secure user account information. All fields are separated by a colon (:) symbol.
What does ” ! ” in account entry in shadow mean?
As it can be read in the following document, “!!” in an account entry in shadow means the account of an user has been created, but not yet given a password. Until being given an initial password by a sysadmin, it is locked by default.