+

Search Tips | Advanced Search

Removing a user from a group on Linux

Remove a user from a group by using the usermod command.


Procedure

To remove a member from a supplementary group, execute the usermod command listing the supplementary groups that you want the user to remain a member of. For example, if the user's primary group is users and the user is also a member of the groups mqm, groupa and groupb, to remove the user from the mqm group, the following command is used: usermod -G groupa,groupb user-name , where user-name is the user name.