How to remove a user from a group in Linux

Written by Ian Carnaghan · 10 sec read >

Use the gpasswd command. The gpasswd command is used to administer /etc/group, and /etc/gshadow.

Use to following command:

sudo gpasswd -d user group

Replace user with the user you wish to remove and group with the group. The -doption is to remove the user from the named group.

Last Updated On April 07, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

Notify of