The /etc/passwd contains one entry per line for each user (or user account) of the system. All fields are separated by a colon (:) symbol. Total seven fields as follows.
An example record may be:
The fields, in order from left to right, are:
- The first field is the user name, i.e. the string a user would type in when logging into the operating system: the logname. Each record in the file must have a unique user name field.
- The second field stores information used to validate a user's password; however in most modern uses this field is usually set to "x" (or some other indicator) with the actual password information being stored in a separate shadow password file. Setting this field to an asterisk "*" is the typical way to deactivate an account to prevent it being used.
- The third field is the user identifier, the number that the operating system uses for internal purposes. It does not have to be unique.
- The fourth field is the group identifier. This number identifies the primary group of the user; all files that are created by this user may initially be accessible to this group.
- The fifth field, called the Gecos field, is commentary that describes the person or account. Typically, this is a set of comma-separated values including the user's full name and contact details.
- The sixth field is the path to the user's home directory.
No comments:
Post a Comment
Do not post irrelevant comments, please!