how to use groupmod command with its examples

  • It is a command used to modify or change the existing group from the Linux systems.
  • It comes from “shadow-utils-4.1.4.2” package.
  • Below listed are the associated configuration files:

       /etc/group              Group account information.
       /etc/gshadow         Secure group account information.

Examples:

1. To change the group ID

$ groupmod -g 600 SUPPORT
$ groupmod –gid 600 SUPPORT

2. To change the group name

$ groupmod -n SUPPORT
$ groupmod –new-name SUPPORT

3. To change the group ID with non-unique

$ groupmod -o 0 SUPPORT
$ groupmod –non-unique 0 SUPPORT

4. To change the group password

$ groupmod -p $!31231@23$531&465%361&23*2314251 SUPPORT
$ groupmod –password $!31231@23$531&465%361&23*2314251 SUPPORT

5. To get the help for groupmod

$ groupmod -h
$ groupmod –help

Related Commands: chfn, chsh, passwd, gpasswd, groupadd, groupdel, useradd, userdel, usermod

Leave a Reply

Your email address will not be published. Required fields are marked *