Overview #

Passwd is one of the POSIX Databases used in POSIX systems to represent the users.

The /etc/passwd file is a text file with one record per line, each describing a user account. Each record consists of seven fields separated by colons. The ordering of the records within the file is generally unimportant.

Field explanation[1]#

An example record may be:
jsmith:x:1001:1000:Joe Smith,Room 1007,(234)555-8910,(234)555-0044,email:/home/jsmith:/bin/sh
The fields, in order from left to right, are:

Passwd and LDAP#

FieldLDAP AttributeComment
Login nameUidThe 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.
Password Specification EntryN/AThe 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.
Numerical user IDuidNumberThe third field is the user identifier, the number that the operating system uses for internal purposes. It does not have to be unique.
Numerical group IDgidNumberThe 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.
User name or comment fieldgecosThe 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.
User home directoryhomeDirectoryThe sixth field is the path to the user's home directory.
Optional user command interpreterloginShellThe seventh field is the program that is started every time the user logs into the system. For an interactive user, this is usually one of the system's command line interpreters (shells).

So from LDAP, you can think of the fields as:


Some Examples#

The "x" implies that a shadow is used.
jwilleke:x:52658:280:Jim Willeke, 213-449-7111:/home/jwilleke:/usr/bin/ksh

Below the "*" implies the entry is external to the host.

scott:*:1001:100:Aaron Scott Willeke:/home/scott:/bin/bash

LDIF entries for passwd and shadow#

LDIF entries for passwd and shadow

More Information#

There might be more information for this subject on one of the following:

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-22) was last changed on 06-Dec-2015 15:20 by jim