LPIC-2 Network Client Management Practice Question
An administrator configures LDAP authentication on a Linux client. After making changes to /etc/nsswitch.conf and /etc/pam.d/system-auth, users can log in but cannot execute commands like 'id username'. What is the most likely cause?
⚠ Common exam trap
Candidates often assume LDAP authentication is fully functional because login succeeds, overlooking that NSS and PAM serve distinct roles—PAM handles authentication, while NSS handles user/group information retrieval—and both must be configured independently for LDAP integration to work completely.
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
✓
nsswitch.conf lacks 'ldap' for passwd
The 'id username' command relies on the Name Service Switch (NSS) to resolve user and group information from configured sources. If 'ldap' is not listed for the 'passwd' database in /etc/nsswitch.conf, the system will not query the LDAP server for user account details, even though PAM may have been configured to authenticate against LDAP. This mismatch allows login (via PAM) but prevents user attribute lookups (via NSS).
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
LDAP server is not reachable
Why it's wrong here
Login works, so the server is reachable.
- ✓
nsswitch.conf lacks 'ldap' for passwd
Why this is correct
Id uses passwd map; if not set to ldap, it won't query LDAP.
- ✗
LDAP binddn is missing
Why it's wrong here
Binddn is for server authentication, not user lookups.
- ✗
PAM configuration is incorrect
Why it's wrong here
Login works, so PAM is fine.
Visual reference
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.