1 .\" Copyright (c) 1990, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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. Neither the name of the University nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" @(#)passwd.1 8.1 (Berkeley) 6/6/93
29 .\" $FreeBSD: src/usr.bin/passwd/passwd.1,v 1.33 2007/11/07 07:59:38 ru Exp $
30 .\" $DragonFly: src/usr.bin/passwd/passwd.1,v 1.6 2006/11/17 23:23:05 swildner Exp $
38 .Nd modify a user's password
52 utility changes the user's local, Kerberos, or NIS password.
53 If the user is not the super-user,
55 first prompts for the current password and will not continue unless the correct
58 When entering the new password, the characters entered do not echo, in order to
59 avoid the password being seen by a passer-by.
62 utility prompts for the new password twice in order to detect typing errors.
64 The new password should be at least six characters long (which
65 may be overridden using the
68 setting for a user's login class) and not purely alphabetic.
69 Its total length must be less than
71 (currently 128 characters).
73 The new password should contain a mixture of upper and lower case
74 characters (which may be overridden using the
77 setting for a user's login class).
78 Allowing lower case passwords may
79 be useful where the password file will be used in situations where only
80 lower case passwords are permissible, such as when using Samba to
81 authenticate Windows clients.
82 In all other situations, numbers, upper
83 case letters and meta characters are encouraged.
85 Once the password has been verified,
87 communicates the new password information to
88 the Kerberos authenticating host.
90 The following option is available:
91 .Bl -tag -width indent
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,
97 is used to update the password databases.
100 When changing local or NIS password, the next password change date
103 capability in the user's login class.
105 To change another user's Kerberos password, one must first
110 The super-user is not required to provide a user's current password
111 if only the local password is modified.
115 utility has built-in support for NIS.
116 If a user exists in the NIS password
117 database but does not exist locally,
119 automatically switches into
123 user does not exist in either the local password database or the
128 When changing an NIS password, unprivileged users are required to provide
129 their old password for authentication (the
131 daemon requires the original password before
132 it will allow any changes to the NIS password maps).
133 This restriction applies even to the
134 super-user, with one important exception: the password authentication is
135 bypassed for the super-user on the NIS master server.
137 the super-user on the NIS master server can make unrestricted changes to
138 anyone's NIS password.
139 The super-user on NIS client systems and NIS slave
140 servers still needs to provide a password before the update will be processed.
142 The following additional options are supported for use with NIS:
143 .Bl -tag -width indent
147 checking heuristics and forces
150 When NIS is enabled, the
152 flag can be used to force
157 This flag can be used to change the entry
158 for a local user when an NIS user exists with the same login name.
159 For example, you will sometimes find entries for system
165 in both the NIS password maps and the local user database.
169 will try to change the NIS password.
172 flag can be used to change the local password instead.
174 Specify what domain to use when changing an NIS password.
177 assumes that the system default domain should be used.
179 primarily for use by the superuser on the NIS master server: a single
180 NIS server can support multiple domains.
181 It is also possible that the
182 domainname on the NIS master may not be set (it is not necessary for
183 an NIS server to also be a client) in which case the
185 command needs to be told what domain to operate on.
187 Specify the name of an NIS server.
188 This option, in conjunction
191 option, can be used to change an NIS password on a non-local NIS
193 When a domain is specified with the
197 is unable to determine the name of the NIS master server (possibly because
198 the local domainname is not set), the name of the NIS master is assumed to
201 This can be overridden with the
204 The specified hostname need not be the name of an NIS master: the
205 name of the NIS master for a given map can be determined by querying any
206 NIS server (master or slave) in a domain, so specifying the name of a
207 slave server will work equally well.
209 Do not automatically override the password authentication checks for the
210 super-user on the NIS master server; assume
214 flag is of limited practical use but is useful for testing.
217 .Bl -tag -width /etc/master.passwd -compact
218 .It Pa /etc/master.passwd
221 a Version 7 format password file
222 .It Pa /etc/passwd.XXXXXX
223 temporary copy of the password file
224 .It Pa /etc/login.conf
225 login class capabilities database
226 .It Pa /etc/auth.conf
227 configure authentication services
243 .%T "UNIX password security"
248 command is really only a link to