How to remove a user from a group in Linux

H

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.

About the author

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.

About Author

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.

Follow Me