usermod

On CentOS, wheel group allow users in this group to run commands as user root with sudo.

To add a user to wheel group, run

On Ubuntu/Debian, use

Remove a User from Group

Example

[email protected]:~# deluser designware sudo
Removing user designware' from group sudo’ …
Done.
[email protected]:~#

Here we remove user designware from group sudo.

To remove a user from all seondary group, run

useradd