Annotation of src/usr.bin/passwd/passwd.1, Revision 1.38
1.38 ! jmc 1: .\" $OpenBSD: passwd.1,v 1.37 2014/02/16 19:20:26 schwarze Exp $
1.9 aaron 2: .\"
1.1 deraadt 3: .\" Copyright (c) 1990 The Regents of the University of California.
4: .\" All rights reserved.
5: .\"
6: .\" Redistribution and use in source and binary forms, with or without
7: .\" modification, are permitted provided that the following conditions
8: .\" are met:
9: .\" 1. Redistributions of source code must retain the above copyright
10: .\" notice, this list of conditions and the following disclaimer.
11: .\" 2. Redistributions in binary form must reproduce the above copyright
12: .\" notice, this list of conditions and the following disclaimer in the
13: .\" documentation and/or other materials provided with the distribution.
1.24 millert 14: .\" 3. Neither the name of the University nor the names of its contributors
1.1 deraadt 15: .\" may be used to endorse or promote products derived from this software
16: .\" without specific prior written permission.
17: .\"
18: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28: .\" SUCH DAMAGE.
29: .\"
30: .\" from: @(#)passwd.1 6.11 (Berkeley) 7/24/91
31: .\"
1.38 ! jmc 32: .Dd $Mdocdate: February 16 2014 $
1.1 deraadt 33: .Dt PASSWD 1
1.8 aaron 34: .Os
1.1 deraadt 35: .Sh NAME
36: .Nm passwd
37: .Nd modify a user's password
38: .Sh SYNOPSIS
39: .Nm passwd
1.32 biorn 40: .Op Fl K | l | y
1.1 deraadt 41: .Op Ar user
42: .Sh DESCRIPTION
1.13 aaron 43: .Nm
1.26 jmc 44: changes the user's local, Kerberos, or YP password.
1.9 aaron 45: First, the user is prompted for their current password.
1.13 aaron 46: If the current password is correctly typed, a new password is requested.
1.1 deraadt 47: The new password must be entered twice to avoid typing errors.
48: .Pp
49: The new password should be at least six characters long and not
50: purely alphabetic.
51: Its total length must be less than
52: .Dv _PASSWORD_LEN
53: (currently 128 characters).
1.13 aaron 54: A mixture of both lower and uppercase letters, numbers, and
55: meta-characters is encouraged.
1.12 provos 56: .Pp
1.18 millert 57: The quality of the password can be enforced by specifying an external
58: checking program via the
59: .Dq passwordcheck
60: variable in
61: .Xr login.conf 5 .
1.9 aaron 62: .Pp
63: The options are as follows:
1.14 aaron 64: .Bl -tag -width Ds
1.31 jmc 65: .It Fl K
66: Forces the change to affect the Kerberos 5 database, even
67: if the user has a password in the local database.
68: Once the password has been verified,
69: .Nm
70: communicates the new password information to the Kerberos authenticating host.
1.32 biorn 71: .Pp
72: The
73: .Ar user
74: argument specifies a principal and optional realm, for example
75: .Dq user@DOMAIN.COM .
1.1 deraadt 76: .It Fl l
1.13 aaron 77: Causes the password to be updated only in the local password file.
1.9 aaron 78: When changing only the local password,
79: .Xr pwd_mkdb 8
1.1 deraadt 80: is used to update the password databases.
1.6 art 81: .It Fl y
1.7 aaron 82: Forces the YP password database entry to be changed, even if
1.9 aaron 83: the user has an entry in the local database.
84: The
1.6 art 85: .Xr rpc.yppasswdd 8
86: daemon should be running on the YP master server.
87: .El
88: .Pp
1.1 deraadt 89: This is the behavior if no flags are specified:
1.26 jmc 90: if Kerberos is active then
1.13 aaron 91: .Nm
1.26 jmc 92: will talk to the Kerberos server (even if the user has an entry
1.7 aaron 93: in the local database).
1.1 deraadt 94: If the password is not in the local password database, then
95: an attempt is made to use the YP database.
96: .Pp
1.11 aaron 97: The superuser is not required to provide a user's current password
1.1 deraadt 98: if only the local password is modified.
1.4 provos 99: .Pp
100: Which type of cipher is used to encrypt the password information
101: depends on the configuration in
1.18 millert 102: .Xr login.conf 5 .
103: It can be different for local
1.30 jmc 104: .Pq Dq localcipher
1.18 millert 105: and YP
1.30 jmc 106: .Pq Dq ypcipher
1.18 millert 107: passwords.
1.28 millert 108: If none is specified, then blowfish with 6 rounds is used for local
1.30 jmc 109: .Pq Dq localcipher
1.28 millert 110: and old is used for YP
1.30 jmc 111: .Pq Dq ypcipher
1.28 millert 112: by default.
1.25 jmc 113: .Sh FILES
114: .Bl -tag -width /etc/master.passwd -compact
115: .It /etc/login.conf
116: configuration options
117: .It Pa /etc/master.passwd
118: user database
119: .It Pa /etc/passwd
1.34 jmc 120: user database, with confidential information removed
1.25 jmc 121: .It Pa /etc/passwd.XXXXXX
122: temporary copy of the password file
123: .It /etc/ptmp
124: lock file for the passwd database
125: .El
1.13 aaron 126: .Sh DIAGNOSTICS
127: .Bl -diag
1.35 schwarze 128: .It "Attempting to lock password file, please wait or press ^C to abort"
1.20 millert 129: .Pp
130: The password file is currently locked by another process;
131: .Nm
132: will keep trying to lock the password file until it succeeds or
1.23 deraadt 133: you hit the interrupt character (control-C by default).
1.20 millert 134: If
135: .Nm
1.35 schwarze 136: is interrupted while trying to gain the lock the password change will
1.20 millert 137: be lost.
138: .Pp
139: If the process holding the lock was prematurely terminated the lock
140: file may be stale and
141: .Nm
142: will wait forever trying to lock the password file.
143: To determine whether a live process is actually holding the lock, the
1.18 millert 144: admin may run the following:
145: .Bd -literal -offset indent
1.22 mpech 146: $ fstat /etc/ptmp
1.18 millert 147: .Ed
148: .Pp
149: If no process is listed, it is safe to remove the
1.13 aaron 150: .Pa /etc/ptmp
1.20 millert 151: file to clear the error.
1.1 deraadt 152: .El
153: .Sh SEE ALSO
154: .Xr chpass 1 ,
1.36 tedu 155: .Xr encrypt 1 ,
1.1 deraadt 156: .Xr login 1 ,
1.18 millert 157: .Xr login.conf 5 ,
1.1 deraadt 158: .Xr passwd 5 ,
159: .Xr pwd_mkdb 8 ,
160: .Xr vipw 8
161: .Rs
1.16 deraadt 162: .%A Robert Morris
163: .%A Ken Thompson
1.37 schwarze 164: .%T Password security: a case history
165: .%J Communications of the ACM
166: .%V Volume 22
167: .%N Issue 11
168: .%D Nov. 1979
169: .%P 594\(en597
1.1 deraadt 170: .Re
171: .Sh HISTORY
172: A
1.13 aaron 173: .Nm
1.1 deraadt 174: command appeared in
1.21 mickey 175: .At v3 .