3
3
.\" Generator: DocBook XSL Stylesheets v1.73.2 <http://docbook.sf.net/>
5
5
.\" Manual: System Management Commands
6
6
.\" Source: System Management Commands
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
11
11
.\" disable justification (adjust text to left margin only)
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:
25
25
\fIuser_name\fR:\fIpassword\fR
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\&.
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
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\&.
40
40
The options which apply to the
44
44
\fB\-c\fR, \fB\-\-crypt\-method\fR
46
Use the specified method to encrypt the passwords\.
46
Use the specified method to encrypt the passwords\&.
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\&.
51
51
\fB\-e\fR, \fB\-\-encrypted\fR
53
Supplied passwords are in encrypted form\.
53
Supplied passwords are in encrypted form\&.
56
56
\fB\-h\fR, \fB\-\-help\fR
58
Display help message and exit\.
58
Display help message and exit\&.
61
61
\fB\-m\fR, \fB\-\-md5\fR
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\&.
66
66
\fB\-s\fR, \fB\-\-sha\-rounds\fR
68
Use the specified number of rounds to encrypt the passwords\.
70
The value 0 means that the system will choose the default number of rounds for the crypt method (5000)\.
72
A minimal value of 1000 and a maximal value of 999,999,999 will be enforced\.
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\&.
70
The value 0 means that the system will choose the default number of rounds for the crypt method (5000)\&.
72
A minimal value of 1000 and a maximal value of 999,999,999 will be enforced\&.
74
You can only use this option with the SHA256 or SHA512 crypt method\&.
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\&.
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\&.
83
PAM is not used to update the passwords\. Only
83
PAM is not used to update the passwords\&. Only
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"
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:
94
94
\fBENCRYPT_METHOD\fR (string)
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)\&.
98
98
It can take one of these values:
118
118
Note: this parameter overrides the
119
119
\fBMD5_CRYPT_ENAB\fR
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\&.
125
125
\fBMD5_CRYPT_ENAB\fR (boolean)
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
130
if you need to copy encrypted passwords to other systems which don\'t understand the new algorithm\. Default is
130
if you need to copy encrypted passwords to other systems which don\'t understand the new algorithm\&. Default is
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\.
137
This variable is deprecated\. You should use
138
\fBENCRYPT_METHOD\fR\.
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\&.
137
This variable is deprecated\&. You should use
138
\fBENCRYPT_METHOD\fR\&.
140
Note: if you use PAM, it is recommended to set this variable consistently with the PAM modules configuration\&.
143
143
\fBSHA_CRYPT_MIN_ROUNDS\fR (number), \fBSHA_CRYPT_MAX_ROUNDS\fR (number)
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)\.
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\.
154
If not specified, the libc will choose the default number of rounds (5000)\.
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)\&.
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\&.
154
If not specified, the libc will choose the default number of rounds (5000)\&.
156
The values must be inside the 1000\-999999999 range\&.
158
158
If only one of the
159
159
\fBSHA_CRYPT_MIN_ROUNDS\fR
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\&.
165
165
\fBSHA_CRYPT_MIN_ROUNDS\fR
167
\fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\.
167
\fBSHA_CRYPT_MAX_ROUNDS\fR, the highest value will be used\&.
171
171
\fI/etc/passwd\fR
173
User account information\.
173
User account information\&.
176
176
\fI/etc/shadow\fR
178
Secure user account information\.
178
Secure user account information\&.
181
\fI/etc/login\.defs\fR
181
\fI/etc/login\&.defs\fR
183
Shadow password suite configuration\.
183
Shadow password suite configuration\&.