How do I remove a user from a root group?

How to Remove a User from a Group?

You can remove a user from a root group from Linux by executing the usermod command without -a option. For example, executing “usermod -G group1 username” will add the user to group1, and will remove it from any other groups where it is. Remember, you can keep users in various groups by listing the groups’ names, separated by a comma.

DevOps & SysAdmins: Remove user from root group

Leave a Comment

Share via
Copy link
Powered by Social Snap