Linux

  1. Home
  2. Computing & Technology
  3. Linux

Linux System Administrator's Guide

From Authors, for About.com

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

The format is explained in more detail on the passwd manual page.

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

* Introduction to Linux Index

Explore Linux

About.com Special Features

Linux

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Documentation
  5. System Administration
  6. Linux System Administrator's Guide - Creating a user

©2009 About.com, a part of The New York Times Company.

All rights reserved.