The Groupmod command
The groupmod command changes the system account files to reflect the modification which are specified on the command line.
Syntax
groupmod [ options ]
The options that apply to the groupmod command are
-g gid
This is used to specify the numerical value of the group's ID. This value should be unique. The value should be non-negative. The values among 0 and 499 are classically reserved for system groups.
-n group_name
This is used to modify the name of the group from group to group_name.
Associated files to be updated whenever the groupmod command is used are
/etc/group - group information
/etc/gshadow - to secure group information
Practice
The given example shows how to change group names and group ids.
# groupmod -g 515 -n mark marketing
# groupmod -g 516 -n sale sales
# groupmod -g 517 -n tech technical
# groupmod -g 528 student
# groupmod -g 529 manager
The given command will modify group ids for manager and student and change the group names for sales, marketing and technical as mark, sale and tech correspondingly