Add/remove user from groups in unix
sudo usermod -aG <group> <username>
The "a" option is to maintain the groups which your username currently belongs to. The "G" option is to change the group.
Remove user from groups using gpasswd:
sudo gpasswd -d <username> <group>
Written by Mariz Melo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#