The gpasswd command

administer /etc/group and /etc/gshadow 2 examples from the lessons of the IVski Linux Playground — try them in the terminal next to them.

Options in the examples

-a, --add user
Add the user to the named group.
-d, --delete user
Remove the user from the named group.

Examples

sudo gpasswd -a user group

Add user to group

sudo gpasswd -d user group

Remove user from group

Lessons that use gpasswd