Ubuntu Users Groups

From richud.com
Jump to: navigation, search

Add a user to a group

sudo usermod -a -G groupname username

The -a option is critical. The user is added to group1 while he continues to be a member of other groups. If it is not used, then the user is added only to group1 and removed from any other groups