XK0-006 Services and User Management Practice Question
A new employee needs a user account on a Linux server. The administrator runs 'useradd -m jdoe' and then 'passwd jdoe'. After setting the password, the employee reports that they cannot log in via SSH. The administrator verifies the password is correct. Which file should the administrator check to ensure the account is not locked?
⚠ Common exam trap
The trap here is assuming that a correct password guarantees login, overlooking that an account can be locked in /etc/shadow.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
/etc/shadow
The /etc/shadow file holds the password hash and lock indicator. A locked account often has an exclamation mark or asterisk prepended to the password hash, which prevents authentication. Since the password was set correctly, the next step is to verify the account is not locked in /etc/shadow, for example by checking for a '!' prefix.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/etc/login.defs
Why it's wrong here
/etc/login.defs sets system-wide defaults for user account creation and password aging, such as UID ranges and password expiration. It does not contain per-user lock status. Checking this file might reveal policy settings, but it will not show whether jdoe's account is locked.
- ✓
/etc/shadow
Why this is correct
The /etc/shadow file contains the encrypted password and account aging information. A locked account is typically indicated by a '!' or '*' prefix in the password field. The administrator should inspect this file to see if the account is locked, which would prevent SSH login even with the correct password.
- ✗
/etc/group
Why it's wrong here
/etc/group defines group memberships and does not store password or lock status. While group membership can affect access, it does not cause an account to be locked. The employee's inability to log in is more likely due to a lock in /etc/shadow, not group configuration.
- ✗
/etc/passwd
Why it's wrong here
/etc/passwd stores user account information such as UID, GID, home directory, and shell. A locked account is not indicated by a field in this file; the password hash and lock status are in /etc/shadow. Checking /etc/passwd might confirm the shell is valid, but it does not reveal account lock status.
Go deeper
Related to this question
Learn chapter
Linux Fundamentals and History
Key term
useradd
A command-line utility in Unix-like operating systems used to create a new user account with specified settings.
Key term
User
A user is any person, system, or device that interacts with an IT service, resource, or identity system, typically authenticated through credentials and authorized to perform specific actions.
About these practice questions
This XK0-006 question is part of Courseiva's 781-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.