Groupmod (8) System administration commands Groupmod (8)
Name
Groupmod-modify a group definition on the system
Outline
groupmod [Options] GROUP
Describe
The groupmod command modifies the definition of the specified group by modifying the appropriate entry in the group Databa Se.
Options
The options that the Groupmod command can accept are:
-G,--gidgid
The group ID of the given group would be a changed to GID.
The value of GID must be a non-negative decimal integer. This value must was unique, unless the-o option is used.
Users who use the group as primary group would be updated to keep the group as their primary group.
Any files that has the old group ID and must continue to belong to group, must has their group ID changed manually.
No checks would be performed with regard to the Gid_min, Gid_max, sys_gid_min, or Sys_gid_max from/etc/login.defs.
-O,--non-unique
When used with THE-G option, allow to change the group GID to a Non-unique value.
-H,--help
Real-world Help information and exit.
-N,--new-namenew_group
The name of the group would be changed from group to New_group name.
-P,--passwordpassword
The password that has been encrypted, as crypt (3) returns.
Note: This option is not recommended because passwords (or encrypted passwords) are seen by the user by listing this process.
You should ensure that the password complies with the system's password policy.
-R,--rootchroot_dir
Apply changes in the Chroot_dir directory with the configuration files from the Chroot_dir directory.
Configuration file
There are configuration variables in/etc/login.defs that can be used to change the behavior of this tool:
Max_members_per_group (number)
The maximum number of members for each group entry. When the maximum value is reached, a new entry (line) (with the same name, same password, same GID) starts at/etc/group.
The default value is 0, which means there is no limit on the number of members in the group.
This feature (split group) allows you to limit the length of the group file. This is for ensuring that the NIS group has a longer row than 1024 characters.
If you want to enforce this restriction, you can use 25.
Note: Split groups may not be supported by all tools (even in the Shadow toolset). You should not use this variable unless you really need it.
File
/etc/group
Group account information.
/etc/gshadow
Security group account information.
/etc/login.defs
Shadow Cipher Suite configuration.
/etc/passwd
User account information.
Exit value
The Groupmod command can return the following values:
0
Success
2
Invalid command syntax
3
Gave the option an invalid argument
4
The specified group does not exist
6
The specified group does not exist
9
Group name already in use
10
Unable to update the group file
See
CHFN (1), Chsh (1), passwd (1), GPASSWD (8), Groupadd (8), Groupdel (8), Login.defs (5), Useradd (8), Userdel (8), Usermod (8).
Shadow-utils 4.1.5.1 2014-02-17 Groupmod (8)
Linux--Groupmod