~xnox/ubuntu/quantal/shadow/clear-locks

« back to all changes in this revision

Viewing changes to man/chpasswd.8

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2009-05-05 09:45:21 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090505094521-wpk2wn3q7957tlah
Tags: 1:4.1.3.1-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Ubuntu specific:
    + debian/login.defs: use SHA512 by default for password crypt routine.
  - debian/patches/stdout-encrypted-password.patch: chpasswd can report
    password hashes on stdout (debian bug 505640).
  - debian/login.pam: Enable SELinux support (debian bug 527106).
  - debian/securetty.linux: support Freescale MX-series (debian bug 527095).
* Add debian/patches/300_lastlog_failure: fixed upstream (debian bug 524873).
* Drop debian/patches/593_omit_lastchange_field_if_clock_is_misset: fixed
  upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\"     Title: chpasswd
2
2
.\"    Author: 
3
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
4
 
.\"      Date: 04/03/2008
 
4
.\"      Date: 04/15/2009
5
5
.\"    Manual: System Management Commands
6
6
.\"    Source: System Management Commands
7
7
.\"
8
 
.TH "CHPASSWD" "8" "04/03/2008" "System Management Commands" "System Management Commands"
 
8
.TH "CHPASSWD" "8" "04/15/2009" "System Management Commands" "System Management Commands"
9
9
.\" disable hyphenation
10
10
.nh
11
11
.\" disable justification (adjust text to left margin only)
19
19
.PP
20
20
The
21
21
\fBchpasswd\fR
22
 
command reads a list of user name and password pairs from standard input and uses this information to update a group of existing users\. Each line is of the format:
 
22
command reads a list of user name and password pairs from standard input and uses this information to update a group of existing users\&. Each line is of the format:
23
23
.PP
24
24
 
25
25
\fIuser_name\fR:\fIpassword\fR
26
26
.PP
27
27
By default the supplied password must be in clear\-text, and is encrypted by
28
 
\fBchpasswd\fR\. Also the password age will be updated, if present\.
 
28
\fBchpasswd\fR\&. Also the password age will be updated, if present\&.
29
29
.PP
30
30
The default encryption algorithm can be defined for the system with the ENCRYPT_METHOD variable of
31
 
\fI/etc/login\.defs\fR, and can be overwiten with the
 
31
\fI/etc/login\&.defs\fR, and can be overwiten with the
32
32
\fB\-e\fR,
33
33
\fB\-m\fR, or
34
34
\fB\-c\fR
35
 
options\.
 
35
options\&.
36
36
.PP
37
 
This command is intended to be used in a large system environment where many accounts are created at a single time\.
 
37
This command is intended to be used in a large system environment where many accounts are created at a single time\&.
38
38
.SH "OPTIONS"
39
39
.PP
40
40
The options which apply to the
43
43
.PP
44
44
\fB\-c\fR, \fB\-\-crypt\-method\fR
45
45
.RS 4
46
 
Use the specified method to encrypt the passwords\.
 
46
Use the specified method to encrypt the passwords\&.
47
47
.sp
48
 
The available methods are DES, MD5, NONE, and SHA256 or SHA512 if your libc support these methods\.
 
48
The available methods are DES, MD5, NONE, and SHA256 or SHA512 if your libc support these methods\&.
49
49
.RE
50
50
.PP
51
51
\fB\-e\fR, \fB\-\-encrypted\fR
52
52
.RS 4
53
 
Supplied passwords are in encrypted form\.
 
53
Supplied passwords are in encrypted form\&.
54
54
.RE
55
55
.PP
56
56
\fB\-h\fR, \fB\-\-help\fR
57
57
.RS 4
58
 
Display help message and exit\.
 
58
Display help message and exit\&.
59
59
.RE
60
60
.PP
61
61
\fB\-m\fR, \fB\-\-md5\fR
62
62
.RS 4
63
 
Use MD5 encryption instead of DES when the supplied passwords are not encrypted\.
 
63
Use MD5 encryption instead of DES when the supplied passwords are not encrypted\&.
64
64
.RE
65
65
.PP
66
66
\fB\-s\fR, \fB\-\-sha\-rounds\fR
67
67
.RS 4
68
 
Use the specified number of rounds to encrypt the passwords\.
69
 
.sp
70
 
The value 0 means that the system will choose the default number of rounds for the crypt method (5000)\.
71
 
.sp
72
 
A minimal value of 1000 and a maximal value of 999,999,999 will be enforced\.
73
 
.sp
74
 
You can only use this option with the SHA256 or SHA512 crypt method\.
 
68
Use the specified number of rounds to encrypt the passwords\&.
 
69
.sp
 
70
The value 0 means that the system will choose the default number of rounds for the crypt method (5000)\&.
 
71
.sp
 
72
A minimal value of 1000 and a maximal value of 999,999,999 will be enforced\&.
 
73
.sp
 
74
You can only use this option with the SHA256 or SHA512 crypt method\&.
75
75
.sp
76
76
By default, the number of rounds is defined by the SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS variables in
77
 
\fI/etc/login\.defs\fR\.
 
77
\fI/etc/login\&.defs\fR\&.
78
78
.RE
79
79
.SH "CAVEATS"
80
80
.PP
81
 
Remember to set permissions or umask to prevent readability of unencrypted files by other users\.
 
81
Remember to set permissions or umask to prevent readability of unencrypted files by other users\&.
82
82
.PP
83
 
PAM is not used to update the passwords\. Only
 
83
PAM is not used to update the passwords\&. Only
84
84
\fI/etc/passwd\fR
85
85
and
86
86
\fI/etc/shadow\fR
87
 
are updated, and the various checks or options provided by PAM modules are not used\.
 
87
are updated, and the various checks or options provided by PAM modules are not used\&.
88
88
.SH "CONFIGURATION"
89
89
.PP
90
90
The following configuration variables in
91
 
\fI/etc/login\.defs\fR
 
91
\fI/etc/login\&.defs\fR
92
92
change the behavior of this tool:
93
93
.PP
94
94
\fBENCRYPT_METHOD\fR (string)
95
95
.RS 4
96
 
This defines the system default encryption algorithm for encrypting passwords (if no algorithm are specified on the command line)\.
 
96
This defines the system default encryption algorithm for encrypting passwords (if no algorithm are specified on the command line)\&.
97
97
.sp
98
98
It can take one of these values:
99
99
.sp
117
117
.sp
118
118
Note: this parameter overrides the
119
119
\fBMD5_CRYPT_ENAB\fR
120
 
variable\.
 
120
variable\&.
121
121
.sp
122
 
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\.
 
122
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\&.
123
123
.RE
124
124
.PP
125
125
\fBMD5_CRYPT_ENAB\fR (boolean)
126
126
.RS 4
127
 
Indicate if passwords must be encrypted using the MD5\-based algorithm\. If set to
128
 
\fIyes\fR, new passwords will be encrypted using the MD5\-based algorithm compatible with the one used by recent releases of FreeBSD\. It supports passwords of unlimited length and longer salt strings\. Set to
 
127
Indicate if passwords must be encrypted using the MD5\-based algorithm\&. If set to
 
128
\fIyes\fR, new passwords will be encrypted using the MD5\-based algorithm compatible with the one used by recent releases of FreeBSD\&. It supports passwords of unlimited length and longer salt strings\&. Set to
129
129
\fIno\fR
130
 
if you need to copy encrypted passwords to other systems which don\'t understand the new algorithm\. Default is
131
 
\fIno\fR\.
 
130
if you need to copy encrypted passwords to other systems which don\'t understand the new algorithm\&. Default is
 
131
\fIno\fR\&.
132
132
.sp
133
133
This variable is superceded by the
134
134
\fBENCRYPT_METHOD\fR
135
 
variable or by any command line option used to configure the encryption algorithm\.
136
 
.sp
137
 
This variable is deprecated\. You should use
138
 
\fBENCRYPT_METHOD\fR\.
139
 
.sp
140
 
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\.
 
135
variable or by any command line option used to configure the encryption algorithm\&.
 
136
.sp
 
137
This variable is deprecated\&. You should use
 
138
\fBENCRYPT_METHOD\fR\&.
 
139
.sp
 
140
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\&.
141
141
.RE
142
142
.PP
143
143
\fBSHA_CRYPT_MIN_ROUNDS\fR (number), \fBSHA_CRYPT_MAX_ROUNDS\fR (number)
147
147
is set to
148
148
\fISHA256\fR
149
149
or
150
 
\fISHA512\fR, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line)\.
151
 
.sp
152
 
With a lot of rounds, it is more difficult to brute forcing the password\. But note also that more CPU resources will be needed to authenticate users\.
153
 
.sp
154
 
If not specified, the libc will choose the default number of rounds (5000)\.
155
 
.sp
156
 
The values must be inside the 1000\-999999999 range\.
 
150
\fISHA512\fR, this defines the number of SHA rounds used by the encryption algorithm by default (when the number of rounds is not specified on the command line)\&.
 
151
.sp
 
152
With a lot of rounds, it is more difficult to brute forcing the password\&. But note also that more CPU resources will be needed to authenticate users\&.
 
153
.sp
 
154
If not specified, the libc will choose the default number of rounds (5000)\&.
 
155
.sp
 
156
The values must be inside the 1000\-999999999 range\&.
157
157
.sp
158
158
If only one of the
159
159
\fBSHA_CRYPT_MIN_ROUNDS\fR
160
160
or
161
161
\fBSHA_CRYPT_MAX_ROUNDS\fR
162
 
values is set, then this value will be used\.
 
162
values is set, then this value will be used\&.
163
163
.sp
164
164
If
165
165
\fBSHA_CRYPT_MIN_ROUNDS\fR
166
166
>
167
 
\fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\.
 
167
\fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\&.
168
168
.RE
169
169
.SH "FILES"
170
170
.PP
171
171
\fI/etc/passwd\fR
172
172
.RS 4
173
 
User account information\.
 
173
User account information\&.
174
174
.RE
175
175
.PP
176
176
\fI/etc/shadow\fR
177
177
.RS 4
178
 
Secure user account information\.
 
178
Secure user account information\&.
179
179
.RE
180
180
.PP
181
 
\fI/etc/login\.defs\fR
 
181
\fI/etc/login\&.defs\fR
182
182
.RS 4
183
 
Shadow password suite configuration\.
 
183
Shadow password suite configuration\&.
184
184
.RE
185
185
.SH "SEE ALSO"
186
186
.PP
188
188
\fBpasswd\fR(1),
189
189
\fBnewusers\fR(8),
190
190
\fBuseradd\fR(8),
191
 
\fBlogin.defs\fR(5)\.
 
191
\fBlogin.defs\fR(5)\&.