EX200 Manage users and groups Practice Question
A server has been compromised, and the administrator suspects an unauthorized user account may have been created. Which file should be examined to list all local user accounts?
⚠ Common exam trap
Red Hat often tests the misconception that /etc/shadow contains the list of user accounts, but it only stores password hashes and aging data; the actual account list is always in /etc/passwd.
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/passwd
The /etc/passwd file is the primary local user account database on Linux systems, listing all user accounts with fields such as username, UID, GID, GECOS, home directory, and login shell. Examining this file reveals every local user account, including any unauthorized ones that may have been created, because each account must have an entry here to be recognized by the system.
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/shadow
Why it's wrong here
/etc/shadow is the correct place to store password hashes and account-aging metadata, but it does not contain the roster of local user accounts. It records fields such as the encrypted password, last password change date, minimum/maximum age, and expiration warnings, and only for entries that have corresponding /etc/passwd records. Since it omits UIDs, home directories, and shell values, it cannot be used to enumerate every account on the compromised host.
- ✓
/etc/passwd
Why this is correct
/etc/passwd is the authoritative, world-readable file that lists every local user account on a Linux system, with one line per account. Each colon-separated record contains the username, a placeholder for the password (typically x), the numeric UID, primary GID, GECOS comment, home directory, and login shell. This is exactly what an administrator should inspect to identify unexpected accounts, such as a newly added UID 0 user or a bad actor’s backdoor entry.
- ✗
/etc/shells
Why it's wrong here
/etc/shells is a configuration file that enumerates the valid login shells on the system, such as /bin/bash and /usr/sbin/nologin, and is primarily used by chsh and service daemons to validate shell choices. It contains no user identities, UIDs, home directories, or GECOS data, so it cannot reveal who has a shell account. Checking it would only confirm which shells are allowed, not whether an attacker added a malicious user.
- ✗
/etc/login.defs
Why it's wrong here
/etc/login.defs defines global default parameters used when creating new user accounts, such as UID_MIN and UID_MAX ranges, password aging defaults, and shadow-related settings. It is a policy file read by useradd/usermod/chpasswd, not a database of existing accounts. Therefore, it would show how accounts are created by default but cannot list accounts that already exist on the compromised server.
Go deeper
Related to this question
About these practice questions
Courseiva writes every EX200 question from scratch — 127 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This EX200 practice question is part of Courseiva's free Red Hat 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 EX200 exam.