Modify Linux Group

groupmod is used to modify the properties of a group.


groupmod [options] GROUP


To change the groupid

groupmod -g 888 Database_group

To change the group name

groupmod -n Database_Groups Database_group

Database_Groups — New name of the group
Database_group — Existing group name


Option Description
g change the group ID to GID
n change the name to NEW_GROUP

The groupmod command exits with the following values:

Option Description
0 success
2 invalid command syntax
3 invalid argument to option
4 GID not unique (when -o not used)
9 group name not unique
10 can´t update group file
Powered by k2schools
Skip to toolbar