1GROUPMOD(8) System Management Commands GROUPMOD(8)
2
3
4
6 groupmod - modify a group definition on the system
7
9 groupmod [options] GROUP
10
12 The groupmod command modifies the definition of the specified GROUP by
13 modifying the appropriate entry in the group database.
14
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
47 Note: This option is not recommended because the password (or
48 encrypted password) will be visible by users listing the processes.
49
50 You should make sure the password respects the system´s password
51 policy.
52
53 -R, --root CHROOT_DIR
54 Apply changes in the CHROOT_DIR directory and use the configuration
55 files from the CHROOT_DIR directory.
56
58 The following configuration variables in /etc/login.defs change the
59 behavior of this tool:
60
61 MAX_MEMBERS_PER_GROUP (number)
62 Maximum members per group entry. When the maximum is reached, a new
63 group entry (line) is started in /etc/group (with the same name,
64 same password, and same GID).
65
66 The default value is 0, meaning that there are no limits in the
67 number of members in a group.
68
69 This feature (split group) permits to limit the length of lines in
70 the group file. This is useful to make sure that lines for NIS
71 groups are not larger than 1024 characters.
72
73 If you need to enforce such limit, you can use 25.
74
75 Note: split groups may not be supported by all tools (even in the
76 Shadow toolsuite). You should not use this variable unless you
77 really need it.
78
80 /etc/group
81 Group account information.
82
83 /etc/gshadow
84 Secure group account information.
85
86 /etc/login.defs
87 Shadow password suite configuration.
88
89 /etc/passwd
90 User account information.
91
93 The groupmod command exits with the following values:
94
95 0
96 success
97
98 2
99 invalid command syntax
100
101 3
102 invalid argument to option
103
104 4
105 specified group doesn´t exist
106
107 6
108 specified group doesn´t exist
109
110 9
111 group name already in use
112
113 10
114 can´t update group file
115
117 chfn(1), chsh(1), passwd(1), gpasswd(8), groupadd(8), groupdel(8),
118 login.defs(5), useradd(8), userdel(8), usermod(8).
119
120
121
122shadow-utils 4.1.5.1 05/10/2016 GROUPMOD(8)