• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

groupmod Command Examples in Linux

by admin

The groupmod command is used to change the group’s own attributes. It will edit the /etc/group file for you. Modifications of the group might include changing its name or GID.

Below are associated configuration files:

  • /etc/group: Group account information.
  • /etc/gshadow: Secure group account info.

Syntax

The syntax of the groupmod command is:

# groupmod [options] {group names}

Some groupmod options include the below.

Option Used To Example
-g Change a group ID. # groupmod -g 123 sales
-n Rename group # groupmod -n newsales sales

groupmod Command 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

Filed Under: Linux

Some more articles you might also be interested in …

  1. ncview: command not found
  2. pacaur Command Examples in Linux
  3. firebase – Test, manage, and deploy Firebase projects from the command-line
  4. pacman –database Command Examples in Arch Linux
  5. “docker system” Command Examples
  6. lslocks Command Examples in Linux
  7. How to re-create the yum cache (force a fetch of the cache data) from enabled repositories in CentOS/RHEL
  8. fnm: Fast Node.js version manager
  9. Linux OS Service ‘ntpd’
  10. strip: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • “glab repo” Command Examples
  • “glab release” Command Examples
  • “glab pipeline” Command Examples
  • “glab mr” Command Examples

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright