1) What is Password file?
Passwd file is a text file, that contains a list of the system’s accounts, giving for each account some useful information like user ID, group ID, home directory, shell, etc.
2) Password file format
* encrypted password (or x if shadow passwords are in use)
* default GID
* real name (also known as the GECOS field)
* home directory
* default shell
3) What is Shadow file?
shadow file contains the encrypted password information for user’s accounts and optional the password aging information.
4) Shadow file format
if shadow passwords are being used, the /etc/shadow file contains users’ encrypted passwords and other information about the passwords. It fields are colon-separated as for /etc/passwd, and are as follows:
* encrypted password
* Days since Jan 1, 1970 that password was last changed
* Days before password may be changed
* Days after which password must be changed
* Days before password is to expire that user is warned
* Days after password expires that account is disabled
* Days since Jan 1, 1970 that account is disabled
* A reserved field
The password expiry related fields are modified by the change program.
5) What is Group file?
group file is an ASCII file which defines the groups to which users belong. There is one entry per line, and each line has the format
All three files are located in /etc directory and we will see each one this file detailed
6) Group file format
The /etc/group file consists of group records, one to a line. Each record contains multiple fields, separated by colons (:). The fields are:
* group name
* encrypted group password (or x if shadow passwords are in use)
* group members’ usernames, comma-separated