EX200 Manage users and groups Practice Question
A user reports they cannot log in to a Linux system. Their account was recently created. The administrator checks /etc/passwd and sees the entry: jsmith:x:1001:1001::/home/jsmith:/sbin/nologin. What is the likely issue?
⚠ Common exam trap
Many exam-takers confuse the shell field with account lockout mechanisms (like using 'passwd -l' or setting the password expiration) or assume that a missing home directory is the cause. In Red Hat Enterprise Linux, the shell field in /etc/passwd directly controls whether an interactive login is allowed; /sbin/nologin explicitly denies login.
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
✓
The user's shell is set to /sbin/nologin which prevents login
The user's shell is set to /sbin/nologin, which is a shell that displays a message and exits immediately, preventing interactive login. This is the direct cause of the login failure, as the system uses the shell field in /etc/passwd to determine the login program.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The user is locked due to expired password
Why it's wrong here
Password expiration does not permanently lock a user out; when the password is expired, PAM typically forces the user to set a new one at the next login before a session starts. The symptom of "cannot log in" with no prompt to change the password implies a different cause. The account's login shell /sbin/nologin is what prevents the session from being established, not an expired password policy.
- ✗
The home directory does not exist
Why it's wrong here
A missing home directory causes applications to fail or the user to land in the root directory, and it can trigger warnings from the login process, but it never blocks authentication or shell startup. The user would still be able to log in and interact with the system, albeit with a broken working environment. In this scenario, the inability to log in at all is due to the shell being set to /sbin/nologin, which terminates the session before the home directory is even evaluated.
- ✗
The user is not in any supplementary groups
Why it's wrong here
Supplementary group membership is not a login prerequisite; groups only affect file permissions and process access during the session. A user with no supplementary groups can still authenticate and start a shell in their primary group. Login failures are caused either by authentication problems, PAM restrictions, or a restricted shell binary like /sbin/nologin, not by missing group entries.
- ✓
The user's shell is set to /sbin/nologin which prevents login
Why this is correct
The login shell in /etc/passwd is the program executed after authentication, so setting it to /sbin/nologin makes the login process run a binary that immediately prints "This account is currently not available" and exits. Since no command interpreter is ever started, the user cannot obtain a shell, making this the direct cause of the reported inability to log in. This is the standard way to deliberately disable interactive logins for system accounts while keeping the account enabled for other services.
Go deeper
Related to this question
About these practice questions
Courseiva writes every EX200 question from scratch — 427 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.