XK0-005 · Question #345
An administrator is adding an existing user named "buddy'' to the Apache group. Which of the following should the administrator perform to accomplish this task?
The correct answer is B. ssermod -g apche buddy. This question tests the command used to add an existing user to a supplementary group on a Linux system.
Question
An administrator is adding an existing user named "buddy'' to the Apache group. Which of the following should the administrator perform to accomplish this task?
Options
- Asseradd -g apache buddy
- Bssermod -g apche buddy
- Csudo useradd -g apache buddy
- Dsudo usermod -g apachebuddy
How the community answered
(23 responses)- A4% (1)
- B96% (22)
Why each option
This question tests the command used to add an existing user to a supplementary group on a Linux system.
useradd is used to create a new user account, not to modify an existing one.
The usermod command is used to modify an existing user's account details, including their group memberships. While `-aG` is typically used to add a user to a supplementary group, `-g` can change the user's primary group, and usermod is the correct utility for modifying an existing user.
useradd is used to create a new user account, not to modify an existing one.
The command `sudo usermod -g apachebuddy` is missing the username as an argument and would attempt to set 'apachebuddy' as a primary group for an unspecified user.
Concept tested: Linux user and group modification
Source: https://man7.org/linux/man-pages/man8/usermod.8.html
Topics
Community Discussion
No community discussion yet for this question.