The /etc/passwd file is a list of users recognized by the system. The system consults the file at login time to determine a user’s UID and to verify the user’s password. Each line in the file represents one user and contains seven fields separated by colons:

•   Login name

•   Encrypted password (unless a shadow password file is used; see below)

•   UID number

•   Default GID number

•   “GECOS” information: full name, office, extension, home phone

•   Home directory

•   Login shell

For example, the following lines are all valid /etc/passwd entries.

root:jsg8Y.1p6uWMo:0:0:The System,,x6096,:/:/bin/cshjl:Hwex6bM8cT3/E:100:0:Jim Lane,ECT8-3,,:/staff/jl:/bin/shdotty:oP0vdZ/s93ZiY:101:20::/home/korbel/dotty:/bin/csh

The ...

Get UNIX System Administration Handbook, Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.