1CHPASSWD(8)               System Management Commands               CHPASSWD(8)
2
3
4

NAME

6       chpasswd - update passwords in batch mode
7

SYNOPSIS

9       chpasswd [options]
10

DESCRIPTION

12       The chpasswd command reads a list of user name and password pairs from
13       standard input and uses this information to update a group of existing
14       users. Each line is of the format:
15
16       user_name:password
17
18
19       By default the supplied password must be in clear-text, and is
20       encrypted by chpasswd. Also the password age will be updated, if
21       present.
22
23       The default encryption algorithm can be defined for the system with the
24       ENCRYPT_METHOD variable of /etc/login.defs, and can be overwiten with
25       the -e, -m, or -c options.
26
27       chpasswd first update the password in memory, and then commit all the
28       changes to disk if no errors occured for any users.
29
30       This command is intended to be used in a large system environment where
31       many accounts are created at a single time.
32

OPTIONS

34       The options which apply to the chpasswd command are:
35
36       -c, --crypt-method
37           Use the specified method to encrypt the passwords.
38
39           The available methods are DES, MD5, NONE, and SHA256 or SHA512 if
40           your libc support these methods.
41
42       -e, --encrypted
43           Supplied passwords are in encrypted form.
44
45       -h, --help
46           Display help message and exit.
47
48       -m, --md5
49           Use MD5 encryption instead of DES when the supplied passwords are
50           not encrypted.
51
52       -s, --sha-rounds
53           Use the specified number of rounds to encrypt the passwords.
54
55           The value 0 means that the system will choose the default number of
56           rounds for the crypt method (5000).
57
58           A minimal value of 1000 and a maximal value of 999,999,999 will be
59           enforced.
60
61           You can only use this option with the SHA256 or SHA512 crypt
62           method.
63
64           By default, the number of rounds is defined by the
65           SHA_CRYPT_MIN_ROUNDS and SHA_CRYPT_MAX_ROUNDS variables in
66           /etc/login.defs.
67

CAVEATS

69       Remember to set permissions or umask to prevent readability of
70       unencrypted files by other users.
71
72       You should make sure the passwords and the encryption method respect
73       the system´s password policy.
74

CONFIGURATION

76       The following configuration variables in /etc/login.defs change the
77       behavior of this tool:
78
79       ENCRYPT_METHOD (string)
80           This defines the system default encryption algorithm for encrypting
81           passwords (if no algorithm are specified on the command line).
82
83           It can take one of these values:
84
85           ·   DES (default)
86
87           ·   MD5
88
89           ·   SHA256
90
91           ·   SHA512
92
93               Note: this parameter overrides the MD5_CRYPT_ENAB variable.
94
95           MD5_CRYPT_ENAB (boolean)
96               Indicate if passwords must be encrypted using the MD5-based
97               algorithm. If set to yes, new passwords will be encrypted using
98               the MD5-based algorithm compatible with the one used by recent
99               releases of FreeBSD. It supports passwords of unlimited length
100               and longer salt strings. Set to no if you need to copy
101               encrypted passwords to other systems which don´t understand the
102               new algorithm. Default is no.
103
104               This variable is superceded by the ENCRYPT_METHOD variable or
105               by any command line option used to configure the encryption
106               algorithm.
107
108               This variable is deprecated. You should use ENCRYPT_METHOD.
109
110           SHA_CRYPT_MIN_ROUNDS (number), SHA_CRYPT_MAX_ROUNDS (number)
111               When ENCRYPT_METHOD is set to SHA256 or SHA512, this defines
112               the number of SHA rounds used by the encryption algorithm by
113               default (when the number of rounds is not specified on the
114               command line).
115
116               With a lot of rounds, it is more difficult to brute forcing the
117               password. But note also that more CPU resources will be needed
118               to authenticate users.
119
120               If not specified, the libc will choose the default number of
121               rounds (5000).
122
123               The values must be inside the 1000-999999999 range.
124
125               If only one of the SHA_CRYPT_MIN_ROUNDS or SHA_CRYPT_MAX_ROUNDS
126               values is set, then this value will be used.
127
128               If SHA_CRYPT_MIN_ROUNDS > SHA_CRYPT_MAX_ROUNDS, the highest
129               value will be used.
130

FILES

132       /etc/passwd
133           User account information.
134
135       /etc/shadow
136           Secure user account information.
137
138       /etc/login.defs
139           Shadow password suite configuration.
140

SEE ALSO

142       passwd(1), newusers(8), login.defs(5), useradd(8).
143
144
145
146System Management Commands        07/24/2009                       CHPASSWD(8)
Impressum