Modify Linux Group

groupmod is used to modify the properties of a group.

Syntax:

groupmod [options] GROUP

Example:

To change the groupid

groupmod -g 888 Database_group

To change the group name

groupmod -n Database_Groups Database_group

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

Options:

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