add user to multiple groups code example
Example 1: ubuntu add user to group
sudo usermod -a -G group username
Example 2: how to add multiple users to group in linux
gpasswd -M userA,userB,userC mygroup
#if gpasswd is available on system.
sudo usermod -a -G group username
gpasswd -M userA,userB,userC mygroup
#if gpasswd is available on system.