]> git.ipfire.org Git - thirdparty/util-linux.git/blob - login-utils/passwd.1
Imported from util-linux-2.7.1 tarball.
[thirdparty/util-linux.git] / login-utils / passwd.1
1 .\" Copyright 1992 Rickard E. Faith (faith@cs.unc.edu)
2 .\" May be distributed under the GNU General Public License
3 .TH PASSWD 1 "11 November 1996" "Util-linux 2.6" "Linux Programmer's Manual"
4 .SH NAME
5 passwd \- change password
6 .SH SYNOPSIS
7 .BR "passwd"
8 .RB [ " \-o " ]
9 .RB [ " \-q " ]
10 .RB [ " \-v " ]
11 .RI [ " name " [ " password " ]]
12 .br
13 .BR "passwd \-f "
14 .RI [ " arguments to chfn " ]
15 .br
16 .BR "passwd \-s "
17 .RI [ " arguments to chsh " ]
18
19 .SH DESCRIPTION
20 Without arguments
21 .B passwd
22 will change the password for the current user. First the user is asked for
23 the old password, then prompted twice for the new password in order to
24 catch typing errors.
25
26 The one and two argument forms may only be used by the superuser. Using the
27 one argument form, the superuser may change the password for that
28 .IR user .
29 The superuser is not asked for the users old password, but the rules
30 for proper passwords are also applied unless the
31 .B "\-o"
32 option is used. The superuser may have legitimate
33 reasons to choose a non-conformant password.
34
35 The two argument form gives the
36 .IR user " the " password
37 stated as the second argument. This may be useful when giving many
38 users an initial generated password. But it can also be extremely
39 dangerous. A simple script bug might change to root password to
40 something unknown.
41
42 Giving an empty string as the second argument erases the password for the
43 user, but only in combination with the
44 .B "\-o"
45 option.
46
47 Password changes may get logged using the
48 .BR syslog (3)
49 facility, depending on compile-time defines (on by default).
50 If so, every change will
51 be logged at a low level as auth.notice, except for changing the root
52 password with will be logged with auth.warning.
53
54 .SH OPTIONS
55 .TP
56 .B "\-f, \-\-fullname"
57 Change the user's full name (the GECOS field of the passwd entry).
58 Invokes /usr/bin/chfn with the non-option command line arguments.
59 .TP
60 .B "\-o, \-\-force"
61 Turn off simplicity checks on the new password. This option may only
62 be used by the super user. This is intend to allow simple initial
63 passwords given by the superuser.
64 .TP
65 .B "\-s, \-\-shell"
66 Change the user's shell by invoking /usr/bin/chsh with the non-option
67 command line arguments.
68 .TP
69 .B "\-q, \-\-quiet, \-\-silent"
70 In this mode passwd won't tell that the passwd get's changed.
71 .TP
72 .B "\-v, \-V, \-\-version"
73 Prints version information and exits.
74
75 .SH PASSWORD RULES
76 The new password must fulfill these rules:
77 .TP
78 o
79 be at least six characters long;
80
81 .TP
82 o
83 must not be equal to the old password;
84
85 .TP
86 o
87 must contain characters out of at least two of the following classes:
88 upper and lower case letters, digits and non alphanumeric characters;
89
90 .TP
91 o
92 must not match neither the username nor any word of the realname,
93 neither in normal nor in reverse order, neither at the beginning nor
94 at the end.
95 .SH FILES
96 .TP
97 .I /etc/passwd
98 The password file.
99 .SH "SEE ALSO"
100 .BR chsh (1),
101 .BR chfn (1),
102 .BR syslog (3),
103 .BR syslog.conf (5),
104 .BR passwd (8).
105 .SH AUTHOR
106 Peter Orbaek (poe@daimi.aau.dk).
107 .br
108 Martin Schulze (joey@infodrom.north.de) with extensive rewriting and
109 improving done.
110 .br
111 .SH MAINTAINER
112 Nicolai Langfeldt (janl@math.uio.no)