XK0-005 · Question #786
XK0-005 Question #786: Real Exam Question with Answer & Explanation
The correct answer is D: usermod -aG finance myuser. To add an existing user, 'myuser', to an existing supplementary group, 'finance', the administrator should use the usermod command with the appropriate options.
Question
A systems administrator is reconfiguring existing user accounts in a Linux system. Which of the following commands should the administrator use to include "myuser" in the finance group?
Options
- Agroupadd finance myuser
- Bgroupmcd finance myuser
- Cuseradd -g finance myuser
- Dusermod -aG finance myuser
Explanation
To add an existing user, 'myuser', to an existing supplementary group, 'finance', the administrator should use the usermod command with the appropriate options.
Common mistakes.
- A.
groupaddis used to create a new group, not to add an existing user to an existing group. - B.
groupmcdis not a standard Linux command for managing groups or users. - C.
useraddis used to create a new user account, not to modify an existing one, and-gwould set the primary group for a new user.
Concept tested. Adding user to supplementary group
Reference. https://man7.org/linux/man-pages/man8/usermod.8.html
Topics
Community Discussion
No community discussion yet for this question.