XK0-004 · Question #379
A Linux amdinisrator is adding a user's local Linux account to the accounting group. The user is also a member of the finance group. Which of the following is the BEST way to add the user to the accou
The correct answer is D. Usermod -aG accounting user1. Assigning secondary groups to users Use usermod command to make existing user a member of an existing group. Use -aG switch to add a new group. In this example, we make user username a member of group groupname. Note that group groupname has to be already created. > usermod -aG g
Question
A Linux amdinisrator is adding a user's local Linux account to the accounting group. The user is also a member of the finance group. Which of the following is the BEST way to add the user to the accounting group while still maintaining the user's existing group members ships?
Options
- AUsermod -g accounting user1
- BUsermod -G accounting, finance user1
- CUsermod -G accounting user1
- DUsermod -aG accounting user1
How the community answered
(35 responses)- A3% (1)
- C3% (1)
- D94% (33)
Explanation
Assigning secondary groups to users Use usermod command to make existing user a member of an existing group. Use -aG switch to add a new group. In this example, we make user username a member of group groupname. Note that group groupname has to be already created. > usermod -aG groupname username
Topics
Community Discussion
No community discussion yet for this question.