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 |
---|---|
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. |
|
Contains an x, a placeholder for the encrypted password. The encrypted password is stored in the shadow file. |
|
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. |
|
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). |
|
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. |
|
Contains user's home directory path name. |
|
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. |