Adding an Existing User to an Existing Group
Use usermod to add a user to supplementary groups. The -a (append) flag is critical — without it, you’ll remove the user from all groups not explicitly listed. usermod -a -G group_name user_name To add a user to multiple groups at once: usermod -a -G group1,group2,group3 user_name Options explained -a, –append Append the user to…
