1PASSWD(5)                  Linux Programmer's Manual                 PASSWD(5)
2
3
4

NAME

6       passwd - password file
7

DESCRIPTION

9       Passwd  is  a text file, that contains a list of the system's accounts,
10       giving for each account some useful information like user ID, group ID,
11       home  directory,  shell,  etc.   Often,  it also contains the encrypted
12       passwords for each account.  It should  have  general  read  permission
13       (many  utilities, like ls(1) use it to map user IDs to user names), but
14       write access only for the superuser.
15
16       In the good old days there was no great problem with this general  read
17       permission.   Everybody  could  read  the  encrypted passwords, but the
18       hardware was too slow to crack a well-chosen  password,  and  moreover,
19       the  basic  assumption  used  to  be that of a friendly user-community.
20       These days many people run some version of the shadow  password  suite,
21       where  /etc/passwd  has  "x"  instead  of  encrypted passwords, and the
22       encrypted passwords are in /etc/shadow which is readable by  the  supe‐
23       ruser only.
24
25       If the encrypted password, whether in /etc/passwd or in /etc/shadow, is
26       an empty string, login is allowed without even asking for  a  password.
27       Note  that this functionality may be intentionally disabled in applica‐
28       tions, or configurable (for example  using  the  "nullok"  or  "nonull"
29       arguments to pam_unix.so).
30
31       If  the  encrypted  password  in  /etc/passwd  is  "*NP*"  (without the
32       quotes), the shadow record should be obtained from a NIS+ server.
33
34       Regardless of whether shadow passwords are used, many sysadmins use  an
35       asterisk  in  the  encrypted password field to make sure that this user
36       can not authenticate him- or herself using a  password.  (But  see  the
37       Notes below.)
38
39       If you create a new login, first put an asterisk in the password field,
40       then use passwd(1) to set it.
41
42       There is one entry per line, and each line has the format:
43
44              account:password:UID:GID:GECOS:directory:shell
45
46       The field descriptions are:
47
48
49              account   the name of the user on the  system.   It  should  not
50                        contain capital letters.
51
52              password  the  encrypted  user password, an asterisk (*), or the
53                        letter 'x'.  (See  pwconv(8)  for  an  explanation  of
54                        'x'.)
55
56              UID       the numerical user ID.
57
58              GID       the numerical primary group ID for this user.
59
60              GECOS     This field is optional and only used for informational
61                        purposes.  Usually, it contains the  full  user  name.
62                        GECOS  means  General Electric Comprehensive Operating
63                        System, which has been renamed to GCOS when GE's large
64                        systems   division  was  sold  to  Honeywell.   Dennis
65                        Ritchie has reported: "Sometimes we sent printer  out‐
66                        put or batch jobs to the GCOS machine.  The gcos field
67                        in the password file was a place to stash the informa‐
68                        tion for the $IDENTcard.  Not elegant."
69
70              directory the user's $HOME directory.
71
72              shell     the  program  to run at login (if empty, use /bin/sh).
73                        If set to a non-existing executable, the user will  be
74                        unable to login through login(1).
75

NOTE

77       If  you  want to create user groups, their GIDs must be equal and there
78       must be an entry in /etc/group, or no group will exist.
79
80       If the encrypted password is set to  an  asterisk,  the  user  will  be
81       unable  to  login  using login(1), but may still login using rlogin(1),
82       run existing processes and initiate new ones through  rsh(1),  cron(1),
83       at(1),  or  mail  filters,  etc.   Trying  to lock an account by simply
84       changing the shell field yields the same result and additionally allows
85       the use of su(1).
86

FILES

88       /etc/passwd
89

SEE ALSO

91       login(1), passwd(1), su(1), group(5), shadow(5)
92
93
94
95File formats                      1998-01-05                         PASSWD(5)
Impressum