1GPASSWD(1)                       User Commands                      GPASSWD(1)
2
3
4

NAME

6       gpasswd - administer /etc/group and /etc/gshadow
7

SYNOPSIS

9       gpasswd [option] group
10

DESCRIPTION

12       The gpasswd command is used to administer /etc/group, and /etc/gshadow.
13       Every group can have administrators, members and a password.
14
15       System administrators can use the -A option to define group
16       administrator(s) and the -M option to define members. They have all
17       rights of group administrators and members.
18
19       gpasswd called by a group administrator with a group name only prompts
20       for the new password of the group.
21
22       If a password is set the members can still use newgrp(1) without a
23       password, and non-members must supply the password.
24
25   Notes about group passwords
26       Group passwords are an inherent security problem since more than one
27       person is permitted to know the password. However, groups are a useful
28       tool for permitting co-operation between different users.
29

OPTIONS

31       Except for the -A and -M options, the options cannot be combined.
32
33       The options which apply to the gpasswd command are:
34
35       -a, --add user
36           Add the user to the named group.
37
38       -d, --delete user
39           Remove the user from the named group.
40
41       -h, --help
42           Display help message and exit.
43
44       -Q, --root CHROOT_DIR
45           Apply changes in the CHROOT_DIR directory and use the configuration
46           files from the CHROOT_DIR directory. Only absolute paths are
47           supported.
48
49       -r, --remove-password
50           Remove the password from the named group. The group password will
51           be empty. Only group members will be allowed to use newgrp to join
52           the named group.
53
54       -R, --restrict
55           Restrict the access to the named group. The group password is set
56           to "!". Only group members with a password will be allowed to use
57           newgrp to join the named group.
58
59       -A, --administrators user,...
60           Set the list of administrative users.
61
62       -M, --members user,...
63           Set the list of group members.
64

CAVEATS

66       This tool only operates on the /etc/group and /etc/gshadow files.  Thus
67       you cannot change any NIS or LDAP group. This must be performed on the
68       corresponding server.
69

CONFIGURATION

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

FILES

137       /etc/group
138           Group account information.
139
140       /etc/gshadow
141           Secure group account information.
142

SEE ALSO

144       newgrp(1), groupadd(8), groupdel(8), groupmod(8), grpck(8), group(5),
145       gshadow(5).
146
147
148
149shadow-utils 4.14.0               10/03/2023                        GPASSWD(1)
Impressum