Which command sets a user's supplementary groups, effectively removing unspecified groups from the user's existing supplementary list?

Prepare for the TestOut Labs Test. Interactive quizzes and flashcards with insights and tips for a comprehensive review. Ace your exam!

Multiple Choice

Which command sets a user's supplementary groups, effectively removing unspecified groups from the user's existing supplementary list?

Explanation:
Using the usermod command with the -G option sets the user’s supplementary groups to exactly the ones you provide, replacing the current list and removing any groups not listed. So the command that assigns the user cflynn to the groups mgmt1 and it will drop any other supplementary groups, which is what the question describes. The other options aren’t correct because they either try to create or reference a non-existent or misapplied group name (treating the user as a group), apply to a different user, or use a different command that doesn’t manage supplementary groups. If you wanted to add a group without removing existing ones, you’d use -aG instead of -G.

Using the usermod command with the -G option sets the user’s supplementary groups to exactly the ones you provide, replacing the current list and removing any groups not listed. So the command that assigns the user cflynn to the groups mgmt1 and it will drop any other supplementary groups, which is what the question describes. The other options aren’t correct because they either try to create or reference a non-existent or misapplied group name (treating the user as a group), apply to a different user, or use a different command that doesn’t manage supplementary groups. If you wanted to add a group without removing existing ones, you’d use -aG instead of -G.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy