UNIX user accounts


The traditional UNIX user account database is the file /etc/passwd. Each record is a line of fields separated by the ':' character:

name:passwd:uid:gid:gecos:dir:shell
name
The user's login name, traditionally limited to 8 characters but often longer in more modern systems.
passwd
Traditionally the encrypted user password, now usually found in /etc/shadow instead.
uid, gid
Numeric user id and primary group id of the user.
gecos
The user's real name and possibly other information like a phone number or office location (GECOS was another operating system used at Bell Labs and this field was originally data from a user's GECOS account).
dir
The user's home directory, the default location for other user-specific configuration information.
shell
The user's shell (specified by full pathname).

BSD systems use a similar /etc/master.passwd file that is used to generate a traditional-format /etc/passwd file.

Next ->


Steve VanDevender
Last modified: Tue Jul 22 12:29:24 PDT 2003