Courseiva
Network Client ManagementhardMultiple ChoiceObjective-mapped

LPIC-2 Network Client Management Practice Question

An organization uses LDAP for centralized authentication. The /etc/nsswitch.conf contains 'passwd: files ldap' and 'shadow: files ldap'. The /etc/pam.d/system-auth includes 'auth requisite pam_ldap.so' and 'account required pam_ldap.so'. However, users can log in using local accounts but not LDAP accounts. The ldapsearch command works correctly against the LDAP server. Logs show 'pam_ldap: error trying to bind as user (No such object)'. Which configuration change is most likely needed?

⚠ Common exam trap

Candidates often confuse a working ldapsearch (which may use anonymous bind or a different credential) with the PAM module's need for a dedicated binddn and bindpw, leading them to focus on network or caching issues instead of the missing authentication credentials for the search user.

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

Ensure /etc/ldap.conf contains a valid 'binddn' and 'bindpw' for the search user.

The error 'pam_ldap: error trying to bind as user (No such object)' indicates that PAM LDAP cannot find the user entry in the LDAP directory. This typically occurs because the binddn (the search user) specified in /etc/ldap.conf is incorrect or missing, preventing PAM from performing the initial search to locate the user's DN. Since ldapsearch works manually, the LDAP server is reachable, but the PAM module lacks the credentials to bind and search for users.

Answer analysis

Option-by-option breakdown

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

  • Open TCP port 389 on the client firewall.

    Why it's wrong here

    Already working per ldapsearch.

  • Add 'uri ldaps://ldap.example.com' to /etc/ldap.conf.

    Why it's wrong here

    LDAPS is not required; bind issue is unrelated to encryption.

  • Restart the nscd service.

    Why it's wrong here

    Not related to bind failure.

  • Ensure /etc/ldap.conf contains a valid 'binddn' and 'bindpw' for the search user.

    Why this is correct

    pam_ldap needs a bind DN to search for users.

About these practice questions

One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.