Sample Header Ad - 728x90

Difference between "usermod -aG" and "usermod -G" options

7 votes
1 answer
14023 views
I'm preparing for the LPIC-1, exam 102, and was wondering what is the difference between these two commands with respect to options -G and -aG: 1) usermod -G projectA, projectB jsmith 2) usermod -aG projectA, projectB jsmith The user jsmith has its own default group, which is not listed above among the groups/projects. As I understand from the man pages of usermod, in (1) jsmith is taken off the listed groups/projects. In (2), the user is appended to those groups listed after -G and this does not affect its belonging to its default group. Do I correctly interpret the usage of these two options?
Asked by WobblyWindows (777 rep)
Sep 10, 2020, 04:21 PM
Last activity: Feb 22, 2023, 10:22 AM