Lpic 1 Linux Administrator · Free Practice Question Medium

Question 19

What is the effect of executing the command groupmod -n admin admins in Linux?
  • A Renames the group 'admins' to 'admin'.
  • B Creates two new groups named 'admins' and 'admin'.
  • C Assigns 'admins' as the primary group for a user named 'admin'.
  • D Removes the user 'admin' from the group 'admins'.
  • E Adds a user named 'admin' to the group 'admins'.
Reveal correct answer

Correct answer: A

A. The command 'groupmod -n admin admins' in Linux renames the group 'admins' to 'admin'. This means that the group 'admins' will be changed to 'admin' throughout the system, affecting any permissions or settings associated with the group.

B. The command 'groupmod -n admin admins' does not create new groups. It specifically renames an existing group from 'admins' to 'admin', so this choice is incorrect.

C. The command 'groupmod -n admin admins' does not assign a group as the primary group for a user. It only renames the group 'admins' to 'admin', so this choice is incorrect.

D. The command 'groupmod -n admin admins' does not remove a user from a group. It is used to rename a group, not to manage user memberships within the group, so this choice is incorrect.

E. The command 'groupmod -n admin admins' does not add a user to a group. It is specifically used to rename an existing group, so this choice is incorrect.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need