-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux gpasswd Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to gpasswd on Linux, covering Arch Linux, CachyOS, and other distributions including group password management, adding/removing members, and group administration.
gpasswd manages group passwords and members.
Uses:
- Group passwords: Set group passwords
- Add members: Add users to groups
- Remove members: Remove users from groups
- Administrators: Manage group admins
Why it matters:
- Group access: Control group membership
- Security: Group password protection
- Management: Easy member management
Set password:
# Set group password
sudo gpasswd groupname
# Enter password
# Confirm passwordDelete password:
# Remove password
sudo gpasswd -r groupname
# Group no longer password-protectedAdd user:
# Add user to group
sudo gpasswd -a username groupname
# User addedRemove user:
# Remove user from group
sudo gpasswd -d username groupname
# User removedReplace members:
# Set group members
sudo gpasswd -M user1,user2,user3 groupname
# Replaces all membersGroup admin:
# Add group administrator
sudo gpasswd -A username groupname
# User can manage groupRemove admin:
# Remove administrator
sudo gpasswd -A "" groupname
# No administratorsCheck permissions:
# Verify group exists
getent group groupname
# Check user exists
id username
# Verify sudo access
sudo -lThis guide covered gpasswd usage, group password management, and member administration for Arch Linux, CachyOS, and other distributions.
- groupadd Guide - Group creation
- User and Groups - User management
- usermod Guide - User modification
-
gpasswd Documentation:
man gpasswd
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.