Forrest logo
tool overview
On this page you find all important commands for the CLI tool gpasswd. If the command you are looking for is missing please ask our AI.


The gpasswd command line tool is used in Unix-like operating systems to manage group passwords. It allows system administrators to add or remove members from a group, change the group owner, and set or change the group password.

  1. The gpasswd command is typically used with superuser privileges or by users who have been granted permission to manage group passwords.
  2. It is a versatile tool that provides various options to modify group information.
  3. One of the primary functions of gpasswd is to add or remove users to a group using the -a (add) or -d (delete) options, respectively.
  4. Additionally, gpasswd can be used to administer group ownership with the -o (change group owner) option.
  5. The -M (set members) option allows administrators to specify a list of users to replace the group members with.
  6. It is also possible to set or change the group's password using the -r (set password) or -R (change password) options.
  7. The group password is stored in the /etc/group file but in an encrypted format.
  8. When setting a password, gpasswd generates a new random salt and prompts the user to enter the password, which is then encrypted and stored.
  9. The command can be further complemented by combining it with other tools such as grep, awk, or sed for advanced group management tasks.
  10. Overall, gpasswd simplifies the task of managing group passwords and provides a straightforward command line interface to handle group-related operations.

List of commands for gpasswd:

tool overview