Courseiva
Network Client ManagementhardMultiple ChoiceObjective-mapped

LPIC-2 Network Client Management Practice Question

An LDAP client fails to authenticate users against an LDAP server. The /etc/nsswitch.conf includes 'passwd: files ldap' and the /etc/pam.d/system-auth has appropriate pam_ldap.so entries. However, 'getent passwd' shows only local users. Which command should the administrator run first to diagnose the issue?

⚠ Common exam trap

The trap here is that candidates often jump to restarting services or checking configuration files, but the LPIC-2 exam emphasizes a systematic troubleshooting approach where connectivity testing (ldapsearch) is the first logical step before assuming configuration or service issues.

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

Run 'ldapsearch -x -H ldap://server -b dc=example,dc=com' to test connectivity.

The first step in diagnosing an LDAP authentication failure is to verify basic connectivity to the LDAP server. Running 'ldapsearch -x -H ldap://server -b dc=example,dc=com' tests whether the client can reach the server and perform a simple anonymous search. If this fails, no amount of configuration tweaking will resolve the issue, as the root cause is likely network or server availability.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • View the contents of /etc/nsswitch.conf.

    Why it's wrong here

    Only confirms order, not actual connectivity.

  • Run 'ldapsearch -x -H ldap://server -b dc=example,dc=com' to test connectivity.

    Why this is correct

    Directly tests if client can bind to LDAP server.

  • Restart the nslcd service.

    Why it's wrong here

    Doesn't diagnose why LDAP is not working; just restarts the service.

  • Check the syntax of /etc/ldap.conf with 'slaptest -f /etc/ldap.conf'.

    Why it's wrong here

    That command is for OpenLDAP server configuration, not client.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

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 →

How Courseiva writes practice questions · Editorial policy

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.