hot to modify user group ubuntu
To modify an existing user, like adding that user to a new group, use the
sudo usermod -a -G groupName userName
The user will need to log out and log back in to see their new group added.
-a(append) switch is essential. Otherwise, the user will be removed from any groups, not in the list.
-Gswitch takes a (comma-separated) list of additional groups to assign the user to.