XK0-005 · Question #1147
XK0-005 Question #1147: Real Exam Question with Answer & Explanation
The correct answer is A: usermod -L root. {"question_number": 10, "question": "An administrator is uncomfortable allowing users to log in as root. Which command ensures that root logins are disallowed?", "correct_answer": "A", "explanation": "The command 'usermod -L root' locks the root account by prepending an exclamati
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
Explanation
{"question_number": 10, "question": "An administrator is uncomfortable allowing users to log in as root. Which command ensures that root logins are disallowed?", "correct_answer": "A", "explanation": "The command 'usermod -L root' locks the root account by prepending an exclamation mark (!) to the password hash in /etc/shadow, making password-based authentication impossible for root. This prevents direct root logins via password. Option B ('usermod -G root') modifies the supplementary group list for root - it does not lock the account. Option C ('usermod -B root') is not a valid usermod flag and will return an error. Option D ('usermod -U root') is the opposite of -L - it unlocks a previously locked account. Note that locking root with -L does not affect key-based SSH access or su/sudo escalation; for full root login prevention, /etc/ssh/sshd_config should also have 'PermitRootLogin no', but among the given options, -L is the correct answer.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.