PASSWD(4-SysV) RISC/os Reference Manual PASSWD(4-SysV)
NAME
passwd - password file
SYNOPSIS
/etc/passwd
DESCRIPTION
The passwd file contains for each user the following infor-
mation:
name User's login name - contains no upper
case characters and must not be greater
than eight characters long.
password encrypted password
numerical user ID This is the user's ID in the system and
it must be unique.
numerical group ID This is the number of the group that the
user belongs to.
user's real name In some versions of UNIX, this field
also contains the user's office, exten-
sion, home phone, and so on. For his-
torical reasons this field is called the
GCOS field.
initial working directory
The directory that the user is posi-
tioned in when they log in - this is
known as the `home' directory.
shell program to use as Shell when the user
logs in.
The user's real name field may contain `&', meaning insert
the login name.
The password file is an ASCII file. Each field within each
user's entry is separated from the next by a colon. Each
user is separated from the next by a new-line. If the pass-
word field is null, no password is demanded; if the shell
field is null, /bin/sh is used.
The passwd file can also have a line beginning with a plus
(+), which means to incorporate entries from the Network
Information Service (NIS). There are three styles of +
entries: all by itself, + means to insert the entire con-
tents of the Network Information Service password file at
that point; +name means to insert the entry (if any) for
name from the NIS at that point; +@name means to insert the
Printed 1/15/91 Page 1
PASSWD(4-SysV) RISC/os Reference Manual PASSWD(4-SysV)
entries for all members of the network group name at that
point. If a + entry has a non-null password, directory,
gecos, or shell field, they will overide what is contained
in the NIS. The numerical user ID and group ID fields can-
not be overridden.
EXAMPLE
Here is a sample /etc/passwd file:
root:q.mJzTnu8icF.:0:10:superuser:/:/bin/csh
tut:6k/7KCFRPNVXg:508:10:Bill Tuthill:/usr2/tut:/bin/csh
+john:
+@documentation:no-login:
+:::Guest
In this example, there are specific entries for users root
tut, in case the NIS are out of order. The user john will
have his password entry in the NIS incorporated without
change; anyone in the netgroup documentation will have their
password field disabled, and anyone else will be able to log
in with their usual password, shell, and home directory, but
with a gecos field of guest.
The password file resides in the /etc directory. Because of
the encrypted passwords, it has general read permission and
can be used, for example, to map numerical user ID's to
names.
Appropriate precautions must be taken to lock the
/etc/passwd file against simultaneous changes if it is to be
edited with a text editor.
FILES
/etc/passwd
SEE ALSO
crypt(3), getpwent(3), group(4).
login(1), passwd(1) in the User's Reference Manual.
ORIGIN
Sun Microsystems
Page 2 Printed 1/15/91