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

NAME

6       groupmod - modify a group definition on the system
7

SYNOPSIS

9       groupmod [options] GROUP
10

DESCRIPTION

12       The groupmod command modifies the definition of the specified GROUP by
13       modifying the appropriate entry in the group database.
14

OPTIONS

16       The options which apply to the groupmod command are:
17
18       -a, --append GID
19           If group members are specified with -U, append them to the existing
20           member list, rather than replacing it.
21
22       -g, --gid GID
23           The group ID of the given GROUP will be changed to GID.
24
25           The value of GID must be a non-negative decimal integer. This value
26           must be unique, unless the -o option is used.
27
28           Users who use the group as primary group will be updated to keep
29           the group as their primary group.
30
31           Any files that have the old group ID and must continue to belong to
32           GROUP, must have their group ID changed manually.
33
34           No checks will be performed with regard to the GID_MIN, GID_MAX,
35           SYS_GID_MIN, or SYS_GID_MAX from /etc/login.defs.
36
37       -h, --help
38           Display help message and exit.
39
40       -n, --new-name NEW_GROUP
41           The name of the group will be changed from GROUP to NEW_GROUP name.
42
43       -o, --non-unique
44           When used with the -g option, allow to change the group GID to a
45           non-unique value.
46
47       -p, --password PASSWORD
48           The encrypted password, as returned by crypt(3).
49
50           Note: This option is not recommended because the password (or
51           encrypted password) will be visible by users listing the processes.
52
53           You should make sure the password respects the system's password
54           policy.
55
56       -R, --root CHROOT_DIR
57           Apply changes in the CHROOT_DIR directory and use the configuration
58           files from the CHROOT_DIR directory.
59
60       -P, --prefix PREFIX_DIR
61           Apply changes in the PREFIX_DIR directory and use the configuration
62           files from the PREFIX_DIR directory. This option does not chroot
63           and is intended for preparing a cross-compilation target. Some
64           limitations: NIS and LDAP users/groups are not verified. PAM
65           authentication is using the host files. No SELINUX support.
66
67       -U, --users
68           A list of usernames to add as members of the group.
69
70           The default behavior (if the -g, -N, and -U options are not
71           specified) is defined by the USERGROUPS_ENAB variable in
72           /etc/login.defs.
73

CONFIGURATION

75       The following configuration variables in /etc/login.defs change the
76       behavior of this tool:
77
78       MAX_MEMBERS_PER_GROUP (number)
79           Maximum members per group entry. When the maximum is reached, a new
80           group entry (line) is started in /etc/group (with the same name,
81           same password, and same GID).
82
83           The default value is 0, meaning that there are no limits in the
84           number of members in a group.
85
86           This feature (split group) permits to limit the length of lines in
87           the group file. This is useful to make sure that lines for NIS
88           groups are not larger than 1024 characters.
89
90           If you need to enforce such limit, you can use 25.
91
92           Note: split groups may not be supported by all tools (even in the
93           Shadow toolsuite). You should not use this variable unless you
94           really need it.
95

FILES

97       /etc/group
98           Group account information.
99
100       /etc/gshadow
101           Secure group account information.
102
103       /etc/login.defs
104           Shadow password suite configuration.
105
106       /etc/passwd
107           User account information.
108

EXIT VALUES

110       The groupmod command exits with the following values:
111
112       0
113           E_SUCCESS: success
114
115       2
116           E_USAGE: invalid command syntax
117
118       3
119           E_BAD_ARG: invalid argument to option
120
121       4
122           E_GID_IN_USE: group id already in use
123
124       6
125           E_NOTFOUND: specified group doesn't exist
126
127       9
128           E_NAME_IN_USE: group name already in use
129
130       10
131           E_GRP_UPDATE: can't update group file
132
133       11
134           E_CLEANUP_SERVICE: can't setup cleanup service
135
136       12
137           E_PAM_USERNAME: can't determine your username for use with pam
138
139       13
140           E_PAM_ERROR: pam returned an error, see syslog facility id groupmod
141           for the PAM error message
142

SEE ALSO

144       chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupdel(8),
145       login.defs(5), useradd(8), userdel(8), usermod(8).
146
147
148
149shadow-utils 4.9                  11/19/2021                       GROUPMOD(8)
Impressum