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       -g, --gid GID
19           The group ID of the given GROUP will be changed to GID.
20
21           The value of GID must be a non-negative decimal integer. This value
22           must be unique, unless the -o option is used.
23
24           Users who use the group as primary group will be updated to keep
25           the group as their primary group.
26
27           Any files that have the old group ID and must continue to belong to
28           GROUP, must have their group ID changed manually.
29
30           No checks will be performed with regard to the GID_MIN, GID_MAX,
31           SYS_GID_MIN, or SYS_GID_MAX from /etc/login.defs.
32
33       -h, --help
34           Display help message and exit.
35
36       -n, --new-name NEW_GROUP
37           The name of the group will be changed from GROUP to NEW_GROUP name.
38
39       -o, --non-unique
40           When used with the -g option, allow to change the group GID to a
41           non-unique value.
42
43       -p, --password PASSWORD
44           The encrypted password, as returned by crypt(3).
45
46           Note: This option is not recommended because the password (or
47           encrypted password) will be visible by users listing the processes.
48
49           You should make sure the password respects the system's password
50           policy.
51
52       -R, --root CHROOT_DIR
53           Apply changes in the CHROOT_DIR directory and use the configuration
54           files from the CHROOT_DIR directory.
55
56       -P, --prefix PREFIX_DIR
57           Apply changes in the PREFIX_DIR directory and use the configuration
58           files from the PREFIX_DIR directory. This option does not chroot
59           and is intended for preparing a cross-compilation target. Some
60           limitations: NIS and LDAP users/groups are not verified. PAM
61           authentication is using the host files. No SELINUX support.
62

CONFIGURATION

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

FILES

86       /etc/group
87           Group account information.
88
89       /etc/gshadow
90           Secure group account information.
91
92       /etc/login.defs
93           Shadow password suite configuration.
94
95       /etc/passwd
96           User account information.
97

EXIT VALUES

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

SEE ALSO

133       chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupdel(8),
134       login.defs(5), useradd(8), userdel(8), usermod(8).
135
136
137
138shadow-utils 4.8.1                11/16/2020                       GROUPMOD(8)
Impressum