]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/passwd/passwd.1
Fix typo: c89, not c88.
[FreeBSD/FreeBSD.git] / usr.bin / passwd / passwd.1
1 .\" Copyright (c) 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\"    must display the following acknowledgement:
14 .\"     This product includes software developed by the University of
15 .\"     California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)passwd.1    8.1 (Berkeley) 6/6/93
33 .\" $FreeBSD$
34 .\"
35 .Dd June 6, 1993
36 .Dt PASSWD 1
37 .Os
38 .Sh NAME
39 .Nm passwd , yppasswd
40 .Nd modify a user's password
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl l
44 .Op Ar user
45 .Nm yppasswd
46 .Op Fl l
47 .Op Fl y
48 .Op Fl d Ar domain
49 .Op Fl h Ar host
50 .Op Fl o
51 .Sh DESCRIPTION
52 The
53 .Nm
54 utility changes the user's local, Kerberos, or NIS password.
55 If the user is not the super-user,
56 .Nm
57 first prompts for the current password and will not continue unless the correct
58 password is entered.
59 .Pp
60 When entering the new password, the characters entered do not echo, in order to
61 avoid the password being seen by a passer-by.
62 The
63 .Nm
64 utility prompts for the new password twice in order to detect typing errors.
65 .Pp
66 The new password should be at least six characters long (which
67 may be overridden using the
68 .Xr login.conf 5
69 .Dq minpasswordlen
70 setting for a user's login class) and not purely alphabetic.
71 Its total length must be less than
72 .Dv _PASSWORD_LEN
73 (currently 128 characters).
74 .Pp
75 The new password should contain a mixture of upper and lower case
76 characters (which may be overridden using the
77 .Xr login.conf 5
78 .Dq mixpasswordcase
79 setting for a user's login class).  Allowing lower case passwords may
80 be useful where the password file will be used in situations where only
81 lower case passwords are permissible, such as when using Samba to
82 authenticate Windows clients.  In all other situations, numbers, upper
83 case letters and meta characters are encouraged.
84 .Pp
85 Once the password has been verified,
86 .Nm
87 communicates the new password information to
88 the Kerberos authenticating host.
89 .Pp
90 The following option is available:
91 .Bl -tag -width indent
92 .It Fl l
93 Cause the password to be updated only in the local
94 password file, and not with the Kerberos database.
95 When changing only the local password,
96 .Xr pwd_mkdb  8
97 is used to update the password databases.
98 .El
99 When changing local or NIS password, the next password change date
100 is set according to
101 .Dq passwordtime
102 capability in the user's login class.
103 .Pp
104 To change another user's Kerberos password, one must first
105 run
106 .Xr kinit 1
107 followed by
108 .Nm .
109 The super-user is not required to provide a user's current password
110 if only the local password is modified.
111 .Sh NIS INTERACTION
112 The
113 .Nm
114 utility has built-in support for NIS.
115 If a user exists in the NIS password
116 database but does not exist locally,
117 .Nm
118 automatically switches into
119 .Dq yppasswd
120 mode.
121 If the specified
122 user does not exist in either the local password database of the
123 NIS password maps,
124 .Nm
125 returns an error.
126 .Pp
127 When changing an NIS password, unprivileged users are required to provide
128 their old password for authentication (the
129 .Xr rpc.yppasswdd 8
130 daemon requires the original password before
131 it will allow any changes to the NIS password maps).
132 This restriction applies even to the
133 super-user, with one important exception: the password authentication is
134 bypassed for the super-user on the NIS master server.
135 This means that
136 the super-user on the NIS master server can make unrestricted changes to
137 anyone's NIS password.
138 The super-user on NIS client systems and NIS slave
139 servers still needs to provide a password before the update will be processed.
140 .Pp
141 The following additional options are supported for use with NIS:
142 .Bl -tag -width indent
143 .It Fl y
144 Override
145 .Nm Ns 's
146 checking heuristics and forces
147 it into NIS mode.
148 .It Fl l
149 When NIS is enabled, the
150 .Fl l
151 flag can be used to force
152 .Nm
153 into
154 .Dq local only
155 mode.
156 This flag can be used to change the entry
157 for a local user when an NIS user exists with the same login name.
158 For example, you will sometimes find entries for system
159 .Dq placeholder
160 users such as
161 .Pa bin
162 or
163 .Pa daemon
164 in both the NIS password maps and the local user database.
165 By
166 default,
167 .Nm
168 will try to change the NIS password.
169 The
170 .Fl l
171 flag can be used to change the local password instead.
172 .It Fl d Ar domain
173 Specify what domain to use when changing an NIS password.
174 By default,
175 .Nm
176 assumes that the system default domain should be used.
177 This flag is
178 primarily for use by the superuser on the NIS master server: a single
179 NIS server can support multiple domains.
180 It is also possible that the
181 domainname on the NIS master may not be set (it is not necessary for
182 an NIS server to also be a client) in which case the
183 .Nm
184 command needs to be told what domain to operate on.
185 .It Fl h Ar host
186 Specify the name of an NIS server.
187 This option, in conjunction
188 with the
189 .Fl d
190 option, can be used to change an NIS password on a non-local NIS
191 server.
192 When a domain is specified with the
193 .Fl d
194 option and
195 .Nm
196 is unable to determine the name of the NIS master server (possibly because
197 the local domainname isn't set), the name of the NIS master is assumed to
198 be
199 .Dq localhost .
200 This can be overridden with the
201 .Fl h
202 flag.
203 The specified hostname need not be the name of an NIS master: the
204 name of the NIS master for a given map can be determined by querying any
205 NIS server (master or slave) in a domain, so specifying the name of a
206 slave server will work equally well.
207 .It Fl o
208 Do not automatically override the password authentication checks for the
209 super-user on the NIS master server; assume 'old' mode instead.
210 This
211 flag is of limited practical use but is useful for testing.
212 .El
213 .Sh FILES
214 .Bl -tag -width /etc/master.passwd -compact
215 .It Pa /etc/master.passwd
216 the user database
217 .It Pa /etc/passwd
218 a Version 7 format password file
219 .It Pa /etc/passwd.XXXXXX
220 temporary copy of the password file
221 .It Pa /etc/login.conf
222 login class capabilities database
223 .It Pa /etc/auth.conf
224 configure authentication services
225 .El
226 .Sh SEE ALSO
227 .Xr chpass 1 ,
228 .Xr kerberos 1 ,
229 .Xr kinit 1 ,
230 .Xr login 1 ,
231 .Xr login.conf 5 ,
232 .Xr passwd 5 ,
233 .Xr kpasswdd 8 ,
234 .Xr pwd_mkdb 8 ,
235 .Xr vipw 8
236 .Rs
237 .%A Robert Morris
238 .%A Ken Thompson
239 .%T "UNIX password security"
240 .Re
241 .Sh NOTES
242 The
243 .Nm yppasswd
244 command is really only a link to
245 .Nm .
246 .Sh HISTORY
247 A
248 .Nm
249 command appeared in
250 .At v6 .