For example, if testuser is a member of group1 and group2, and you need to add the user to group3, the command would be:
usermod -G group1,group2,group3 testuser
If you mistakenly ran:
usermod -G group3 testuser
Then testuser would be removed from group1 and group2 and only be a member of group3.
usermod -G group1,group2,group3 testuser
If you mistakenly ran:
usermod -G group3 testuser
Then testuser would be removed from group1 and group2 and only be a member of group3.
No comments:
Post a Comment