xref: /netbsd/usr.bin/passwd/passwd.1 (revision 6550d01e)
1.\"	$NetBSD: passwd.1,v 1.28 2006/03/07 01:52:09 hubertf 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. Neither the name of the University nor the names of its contributors
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    8.1 (Berkeley) 6/6/93
31.\"
32.Dd February 25, 2005
33.Dt PASSWD 1
34.Os
35.Sh NAME
36.Nm passwd
37.Nd modify a user's password
38.Sh SYNOPSIS
39.Nm
40.Op Ar user
41.Nm
42.Oo Fl d Ar files | Fl l Oc
43.Op Ar user
44.Nm
45.Oo Fl d Ar nis | Fl y Oc
46.Op Ar user
47.Nm
48.Oo Fl d Ar krb5 | Fl k Oc
49.Op Ar principal
50.Sh DESCRIPTION
51.Nm
52changes the user's password.
53First, the user is
54prompted for their current password.
55If the current password is correctly typed, a new password is
56requested.
57The new password must be entered twice to avoid typing errors.
58.Pp
59The new password should be at least six characters long and not
60purely alphabetic.
61Its total length must be less than
62.Dv _PASSWORD_LEN
63(currently 128 characters).
64Numbers, upper case letters and meta characters
65are encouraged.
66.Pp
67All options may not be available on all systems.
68.Bl -tag -width flag
69.It Fl d Ar database
70This option specifies the password database that should be updated.  The
71following databases are supported:
72.Bl -tag -width files
73.It files
74This specifies that the password change should be applied to the local
75password file.
76When changing only the local password,
77.Nm
78uses
79.Xr pwd_mkdb 8
80to update the password databases.
81.It nis
82This specifies that the password change should be applied to the NIS
83password database.
84The
85.Xr rpc.yppasswdd 8
86daemon should be running on the master NIS server.
87.It krb5
88This specifies that the user's Kerberos 5 password should be changed.
89The host must be configured to use Kerberos.
90See
91.Xr krb5.conf 5 .
92.El
93.It Fl l
94This is the equivalent of
95.Fl d Ar files .
96.It Fl y
97This is the equivalent of
98.Fl d Ar nis .
99.It Fl k
100This is the equivalent of
101.Fl d Ar krb5 .
102.El
103.Pp
104If a password database is not specified,
105.Nm
106will change the password database as determined by the
107Pluggable Authentication Module
108.Pq PAM
109library.
110.Pp
111The type of cipher used to encrypt the password depends on the configuration
112in
113.Xr passwd.conf 5 .
114It can be different for local and NIS passwords.
115.Sh FILES
116.Bl -tag -width /etc/master.passwd -compact
117.It Pa /etc/master.passwd
118The user database
119.It Pa /etc/passwd
120A Version 7 format password file
121.It Pa /etc/passwd.XXXXXX
122Temporary copy of the password file
123.El
124.Sh SEE ALSO
125.Xr chpass 1 ,
126.Xr login 1 ,
127.Xr pwhash 1 ,
128.Xr passwd 5 ,
129.Xr passwd.conf 5 ,
130.Xr pam 8 ,
131.Xr pwd_mkdb 8 ,
132.Xr vipw 8
133.Rs
134.%A Robert Morris
135.%A Ken Thompson
136.%T "UNIX password security"
137.Re
138.Sh HISTORY
139A
140.Nm
141command appeared in
142.At v6 .
143