gpasswd

Administer /etc/group and /etc/gshadow. More information: <https://manned.org/gpasswd>.

Install

All systems
curl cmd.cat/gpasswd.sh
Debian Debian
apt-get install passwd
Ubuntu
apt-get install passwd
Alpine
apk add shadow
Arch Arch Linux
pacman -S shadow
image/svg+xml Kali Linux
apt-get install passwd
Fedora
dnf install shadow-utils-2
Windows (WSL2)
sudo apt-get update sudo apt-get install passwd
Raspbian
apt-get install passwd
Docker
docker run cmd.cat/gpasswd gpasswd powered by Commando

Administer /etc/group and /etc/gshadow. More information: <https://manned.org/gpasswd>.

  • Define group administrators:
    sudo gpasswd -A user1,user2 group
  • Set the list of group members:
    sudo gpasswd -M user1,user2 group
  • Create a password for the named group:
    gpasswd group
  • Add a user to the named group:
    gpasswd -a user group
  • Remove a user from the named group:
    gpasswd -d user group

© tl;dr; authors and contributors