LPIC-2 Network Client Management Practice Question
Exhibit
Refer to the exhibit. # /etc/nsswitch.conf passwd: files ldap shadow: files ldap group: files ldap hosts: files dns
A user authenticates via LDAP successfully, but 'getent passwd' only shows local users. What is the problem?
⚠ Common exam trap
Candidates often assume successful authentication implies all LDAP services are working, but LPIC-2 tests the distinction between NSS maps (passwd, group) and PAM modules (auth, account), where a failure in the passwd map query does not prevent authentication if the LDAP server responds to bind requests.
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 LDAP server is not responding for passwd queries.
The user can authenticate via LDAP (which typically uses the 'auth' or 'account' NSS modules) but 'getent passwd' only shows local users, indicating that the NSS 'passwd' map is not querying the LDAP server. This means the LDAP server is either unreachable for passwd queries or the NSS configuration for the 'passwd' database is misconfigured (e.g., missing 'ldap' in /etc/nsswitch.conf for passwd). The successful authentication suggests the LDAP server is reachable for authentication purposes, but the passwd map query fails, often due to a separate LDAP server or service issue specific to user/group lookups.
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 ldap entry should be before files.
Why it's wrong here
Order does not prevent showing LDAP users if server works.
- ✓
The LDAP server is not responding for passwd queries.
Why this is correct
If the server doesn't respond, getent falls back to files after files.
- ✗
The shadow map is missing LDAP.
Why it's wrong here
Shadow is separate and not used by getent passwd.
- ✗
The nscd cache needs to be cleared.
Why it's wrong here
nscd is not mentioned; but the issue is likely server unreachable.
Go deeper
Related to this question
About these practice questions
This LPIC-2 question is part of Courseiva's 507-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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.