System Administration Guide, Volume I

Fields in the passwd File

The fields in the passwd file are separated by colons and contain the following information:


username:password:uid:gid:comment:home-directory:login-shell

For example:


kryten:x:101:100:Kryten Series 4000:/export/home/kryten:/bin/csh

Table 1-6 describes the passwd file fields.

Table 1-6 Fields in the passwd File

Field Name 

Description 

username

Contains the user or login name. User names should be unique and consist of 1-8 letters (A-Z, a-z) and numerals (0-9). The first character must be a letter, and at least one character must be a lowercase letter. User names cannot contain underscores or spaces. 

password

Contains an x, a placeholder for the encrypted password. The encrypted password is stored in the shadow file.

uid

Contains a user identification (UID) number that identifies the user to the system. UID numbers for regular users should range from 100 to 60000. All UID numbers should be unique. 

gid

Contains a group identification (GID) number that identifies the user's primary group. Each GID number must be a whole number between 0 and 60002 (60001 and 60002 are assigned to nobody and noaccess, respectively).

comment

Usually contains the full name of the user. (This field is informational only.) It is sometimes called the GECOS field because it was originally used to hold the login information needed to submit batch jobs to a mainframe running GECOS (General Electric Computer Operating System) from UNIX systems at Bell Labs. 

home-directory

Contains user's home directory path name. 

login-shell

Contains the user's default login shell, which can be /bin/sh, /bin/csh or /bin/ksh. Table 1-11 contains a description of shell features.