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

NAME

6       chgpasswd - update group passwords in batch mode
7

SYNOPSIS

9       chgpasswd [options]
10

DESCRIPTION

12       The chgpasswd command reads a list of group name and password pairs
13       from standard input and uses this information to update a set of
14       existing groups. Each line is of the format:
15
16       group_name:password
17
18       By default the supplied password must be in clear-text, and is
19       encrypted by chgpasswd.
20
21       The default encryption algorithm can be defined for the system with the
22       ENCRYPT_METHOD variable of /etc/login.defs, and can be overwritten with
23       the -e, -m, or -c options.
24
25       This command is intended to be used in a large system environment where
26       many accounts are created at a single time.
27

OPTIONS

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

CAVEATS

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

CONFIGURATION

75       The following configuration variables in /etc/login.defs change the
76       behavior of this tool:
77
78       ENCRYPT_METHOD (string)
79           This defines the system default encryption algorithm for encrypting
80           passwords (if no algorithm are specified on the command line).
81
82           It can take one of these values: DES (default), MD5, SHA256,
83           SHA512.
84
85           Note: this parameter overrides the MD5_CRYPT_ENAB variable.
86
87       MAX_MEMBERS_PER_GROUP (number)
88           Maximum members per group entry. When the maximum is reached, a new
89           group entry (line) is started in /etc/group (with the same name,
90           same password, and same GID).
91
92           The default value is 0, meaning that there are no limits in the
93           number of members in a group.
94
95           This feature (split group) permits to limit the length of lines in
96           the group file. This is useful to make sure that lines for NIS
97           groups are not larger than 1024 characters.
98
99           If you need to enforce such limit, you can use 25.
100
101           Note: split groups may not be supported by all tools (even in the
102           Shadow toolsuite). You should not use this variable unless you
103           really need it.
104
105       MD5_CRYPT_ENAB (boolean)
106           Indicate if passwords must be encrypted using the MD5-based
107           algorithm. If set to yes, new passwords will be encrypted using the
108           MD5-based algorithm compatible with the one used by recent releases
109           of FreeBSD. It supports passwords of unlimited length and longer
110           salt strings. Set to no if you need to copy encrypted passwords to
111           other systems which don't understand the new algorithm. Default is
112           no.
113
114           This variable is superseded by the ENCRYPT_METHOD variable or by
115           any command line option used to configure the encryption algorithm.
116
117           This variable is deprecated. You should use ENCRYPT_METHOD.
118
119       SHA_CRYPT_MIN_ROUNDS (number), SHA_CRYPT_MAX_ROUNDS (number)
120           When ENCRYPT_METHOD is set to SHA256 or SHA512, this defines the
121           number of SHA rounds used by the encryption algorithm by default
122           (when the number of rounds is not specified on the command line).
123
124           With a lot of rounds, it is more difficult to brute forcing the
125           password. But note also that more CPU resources will be needed to
126           authenticate users.
127
128           If not specified, the libc will choose the default number of rounds
129           (5000).
130
131           The values must be inside the 1000-999,999,999 range.
132
133           If only one of the SHA_CRYPT_MIN_ROUNDS or SHA_CRYPT_MAX_ROUNDS
134           values is set, then this value will be used.
135
136           If SHA_CRYPT_MIN_ROUNDS > SHA_CRYPT_MAX_ROUNDS, the highest value
137           will be used.
138

FILES

140       /etc/group
141           Group account information.
142
143       /etc/gshadow
144           Secure group account information.
145
146       /etc/login.defs
147           Shadow password suite configuration.
148

SEE ALSO

150       gpasswd(1), groupadd(8), login.defs(5).
151
152
153
154shadow-utils 4.6                  02/02/2019                      CHGPASSWD(8)
Impressum