Information Technology Reference
In-Depth Information
Table 3.5
/etc/passwd Fields
Field
Purpose
user name
The unique name assigned to the user account.
password
In earlier versions of Unix, the password field contained the
encrypted account password. For security reasons, the passwords
have been moved to the /etc/shadow file. The letter “x” is typically
placed in this field to indicate that the password is in /etc/shadow .
UID
A unique numeric identification assigned to the user account. Any
processes or files created by the user account will be owned by
this UID. The system administrator account, root, is assigned the
UID of 0. This is the UID of a superuser account. System mainte-
nance accounts are usually assigned a UID of less than 100,
whereas user accounts typically start at 1001.
GID
The numeric identification of the default group that the user
account has been assigned to as a member. Groups are defined in
the /etc/group file.
comment field
Information about the owner of the user account, such as real
name, phone number, mailing address, and so on. An ampersand
in this field is interpreted as the contents of the username field.
home directory
The full path to the directory where the user is initially located after
logging in.
login shell
The full pathname of the initial shell used as a command inter-
preter. If left empty, the default is /usr/bin/sh .
The following listing shows the default contents of a Solaris 9 /etc/password
file:
root:x:0:1:Super-User:/:/sbin/sh
daemon:x:1:1::/:
bin:x:2:2::/usr/bin:
sys:x:3:3::/:
adm:x:4:4:Admin:/var/adm:
lp:x:71:8:Line Printer Admin:/usr/spool/lp:
uucp:x:5:5:uucp Admin:/usr/lib/uucp:
nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
smmsp:x:25:25:SendMail Message Submission Program:/:
listen:x:37:4:Network Admin:/usr/net/nls:
nobody:x:60001:60001:Nobody:/:
noaccess:x:60002:60002:No Access User:/:
nobody4:x:65534:65534:SunOS 4.x Nobody:/:
/etc/shadow
The /etc/shadow file is an ASCII file that is used to store passwords for local
user accounts along with any password restrictions or aging. Access is
restricted to superusers to protect the passwords. Each line represents the
Search WWH ::




Custom Search