A team lead asks to add jdoe to the devops and analytics groups while keeping jdoe’s current supplementary memberships intact. Which command fulfills this requirement?
The chosen command uses the short form append flag together with the group selection flag to add multiple supplementary groups without resetting any existing ones. Omitting the append option would overwrite secondary memberships. Changing the primary group only alters the default group, and gpasswd -M replaces a group’s entire membership list rather than appending for a given user.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is the '-a' flag in 'usermod -aG' important?
Open an interactive chat with Bash
What is the difference between '-g' and '-G' in the 'usermod' command?
Open an interactive chat with Bash
When should 'gpasswd -M' be used instead of 'usermod'?