1.\" $NetBSD: passwd.1,v 1.19 2002/09/30 11:09:08 grant Exp $ 2.\" 3.\" Copyright (c) 1990, 1993 4.\" The Regents of the University of California. 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. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" from: @(#)passwd.1 8.1 (Berkeley) 6/6/93 35.\" 36.Dd June 6, 1993 37.Dt PASSWD 1 38.Os 39.Sh NAME 40.Nm passwd , 41.Nm yppasswd , 42.Nm kpasswd 43.Nd modify a user's password 44.Sh SYNOPSIS 45.Nm passwd 46.Op Fl l 47.Op Ar user 48.Nm passwd 49.Op Fl y 50.Op Ar user 51.Nm passwd 52.Op Fl 4 53.Op Fl k 54.Op Fl i Ar instance 55.Op Fl r Ar realm 56.Op Fl u Ar fullname 57.Op Ar user 58.Nm passwd 59.Op Fl 5 60.Op Fl k 61.Op Fl u Ar fullname 62.Op Ar user 63.Nm kpasswd 64.Op Fl 4 65.Op Fl k 66.Op Fl i Ar instance 67.Op Fl r Ar realm 68.Op Fl u Ar fullname 69.Op Ar user 70.Nm kpasswd 71.Op Fl 5 72.Op Fl k 73.Op Fl u Ar fullname 74.Op Ar user 75.Nm yppasswd 76.Op Ar user 77.Sh DESCRIPTION 78.Nm 79changes the user's local, YP, or kerberos password. 80First, the user is 81prompted for their current password. 82If the current password is correctly typed, a new password is 83requested. 84The new password must be entered twice to avoid typing errors. 85.Pp 86The new password should be at least six characters long and not 87purely alphabetic. 88Its total length must be less than 89.Dv _PASSWORD_LEN 90(currently 128 characters). 91Numbers, upper case letters and meta characters 92are encouraged. 93.Pp 94All options may not be available on all systems. 95.Bl -tag -width flag 96.It Fl l 97This option causes the password to be updated only in the local 98password file. 99When changing only the local password, 100.Xr pwd_mkdb 8 101is used to update the password databases. 102.It Fl y 103This forces the YP password database entry to be changed, even if 104the user has an entry in the local database. 105The 106.Xr rpc.yppasswdd 8 107daemon should be running on the YP master server. 108.Nm yppasswd 109is the equivalent of 110.Nm 111with the 112.Fl y 113flag. 114.It Fl 4 115This option causes passwd to change the user's kerberos password, 116using the kerberos 4 admin protocol. 117.It Fl 5 118This option causes passwd to change the user's kerberos password, 119using the kerberos 5 admin protocol. 120.It Fl k 121This option causes passwd to change the user's kerberos password, 122using either the kerberos 4 or kerberos 5 admin protocol. 123If both kerberos 4 and kerberos 5 libraries and config files are 124installed on the host, kerberos 5 will be used to change the password. 125.Nm kpasswd 126is the equivalent of 127.Nm 128with the 129.Fl k 130flag. 131.It Fl i Ar instance 132This option selects a non-default Kerberos 4 instance for the 133Kerberos password to be changed. 134.It Fl r Ar realm 135This option selects a non-default Kerberos 4 realm for the Kerberos 136password to be changed. 137.It Fl u Ar fullname 138This option specifies the entire principal.instance@realm (for Kerberos 1394) or principal/instance@realm (for Kerberos 5) for the Kerberos 140password to be changed. 141.El 142.Pp 143This is the behavior if no flags are specified: 144If Kerberos is active then 145.Nm 146will talk to the Kerberos server, attempting to use Kerberos 5, then 147Kerberos 4 protocols to change the password (even if the user has an 148entry in the local database.) 149If Kerberos is unavailable, an attempt is made to use the YP database. 150If the password is not in the YP database, then 151an attempt is made to use the local password database. 152.Pp 153The super-user is not required to provide a user's current password 154if only the local password is modified. 155.Pp 156The type of cipher used to encrypt the password depends on the configuration 157in 158.Xr passwd.conf 5 . 159It can be different for local and YP passwords. 160.Sh FILES 161.Bl -tag -width /etc/master.passwd -compact 162.It Pa /etc/master.passwd 163The user database 164.It Pa /etc/passwd 165A Version 7 format password file 166.It Pa /etc/passwd.XXXXXX 167Temporary copy of the password file 168.El 169.Sh SEE ALSO 170.Xr chpass 1 , 171.Xr login 1 , 172.Xr passwd 5 , 173.Xr passwd.conf 5 , 174.Xr pwd_mkdb 8 , 175.Xr vipw 8 176.Rs 177.%A Robert Morris 178.%A Ken Thompson 179.%T "UNIX password security" 180.Re 181.Sh HISTORY 182A 183.Nm 184command appeared in 185.At v6 . 186