Password, Shadow and Group files Description in Linux

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

* username
* 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:
* username
* 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


  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: