• 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

gpasswd: command not found

by Deepika

gpasswd is a command-line utility in Linux and Unix-like systems that allows administrators to administer the /etc/group and /etc/gshadow files. These files contain information about the groups on the system, including the group name, the group ID, and the list of users that are members of the group.

The gpasswd command can be used to perform a variety of tasks related to group management, such as:

  • Adding and removing users from a group
  • Changing the group’s name or ID
  • Changing the group’s password (if the /etc/gshadow file is used)
  • Displaying information about a group

If you encounter the below error while running the command gpasswd:

gpasswd: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install passwd
Ubuntu apt-get install passwd
Alpine apk add shadow
Arch Linux pacman -S shadow
Kali Linux apt-get install passwd
Fedora dnf install shadow-utils-2
Raspbian apt-get install passwd

gpasswd Command Examples

1. Define group administrators:

# sudo gpasswd -A user1,user2 group

2. Set the list of group members:

# sudo gpasswd -M user1,user2 group

3. Create a password for the named group:

# gpasswd group

4. Add a user to the named group:

# gpasswd -a user group

5. Remove a user from the named group:

# gpasswd -d user group

Filed Under: Linux

Some more articles you might also be interested in …

  1. aura Command Examples
  2. dvc commit: Record changes to DVC-tracked files in the project
  3. git annex: Manage files with Git, without checking their contents in
  4. mdbook Command Examples in Linux
  5. How to uninstall rhythmbox-plugins from Ubuntu
  6. How to Install Automatic Bug Reporting Tool(ABRT) package in RHEL 9 (How to capture coredump in RHEL 9)
  7. mimetype: command not found
  8. gyb Command Examples
  9. strip: command not found
  10. How to Disable/Enable services in Zimbra Mail Server

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright