XK0-005 · Question #152
An administrator is uncomfortable allowing users to log in as root. Which of the following ensures that root logins are disallowed?
The correct answer is A. usermod -L root. The usermod -L flag locks a user account by prepending an exclamation mark (!) to the encrypted password in /etc/shadow, effectively preventing password-based login. Using usermod -L root locks the root account, disallowing direct root logins. Option B (-G) modifies group…
Question
An administrator is uncomfortable allowing users to log in as root. Which of the following ensures that root logins are disallowed?
Options
- Ausermod -L root
- Busermod -G root
- Cusermod -B root
- Dusermod -U root
How the community answered
(29 responses)- A86% (25)
- B7% (2)
- C3% (1)
- D3% (1)
Explanation
The usermod -L flag locks a user account by prepending an exclamation mark (!) to the encrypted password in /etc/shadow, effectively preventing password-based login. Using usermod -L root locks the root account, disallowing direct root logins. Option B (-G) modifies group membership, option C (-B) is not a valid usermod flag, and option D (-U) is the opposite - it unlocks a previously locked account.
Topics
Community Discussion
No community discussion yet for this question.