[PLAINTEXT]
To change primary group
# usermod -g newgroupname user
or
# usermod -g newgroupid user
To change secondary group
good to check what are the current groups that a user belong to
# groups user
For Linux :-
# usermod -a -G newsecondarygroup
verify
# groups user
ensure that newsecondarygroup is added to the existing secondary group(s)