11.2.1. /etc/passwd and other informative files
The basic user database in a Unix system is the text file, /etc/passwd (called the password file ), which lists all valid usernames and their associated information. The file has one line per username, and is divided into seven colon-delimited fields:
Username.
Previously this was where the user's password was stored.
Numeric user id.
Numeric group id.
Full name or other description of account.
Home directory.
Login shell (program to run at login).
Most Linux systems use shadow passwords . As mentioned, previously passwords were stored in the /etc/passwd file. This newer method of storing the password: the encrypted password is stored in a separate file, /etc/shadow , which only root can read. The /etc/passwd file only contains a special marker in the second field. Any program that needs to verify a user is setuid, and can therefore access the shadow password file. Normal programs, which only use the other fields in the password file, can't get at the password.
* License

