Drag steps to the numbered slots on the right, or tap a step then tap a slot.
LPIC-2 DNS, Web and Mail Services Practice Question
Order the steps to configure a Linux system to use LDAP for authentication.
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
1. Install LDAP authentication packages; 2. Configure LDAP client settings; 3. Modify nsswitch.conf to use ldap; 4. Modify PAM configuration to include pam_ldap; 5. Restart services and test authentication.
Install packages, configure LDAP client, modify nsswitch, modify PAM, then restart and test.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
1. Install LDAP authentication packages; 2. Configure LDAP client settings; 3. Modify nsswitch.conf to use ldap; 4. Modify PAM configuration to include pam_ldap; 5. Restart services and test authentication.
Why this is correct
This is the correct order because packages must be installed first to have the necessary tools; then the LDAP client is configured to point to the server; nsswitch is updated to query LDAP for user/group info; PAM is modified to authenticate against LDAP; finally, services are restarted and tested to apply changes.
- ✗
1. Install LDAP authentication packages; 2. Modify nsswitch.conf to use ldap; 3. Configure LDAP client settings; 4. Modify PAM configuration to include pam_ldap; 5. Restart services and test authentication.
Why it's wrong here
This order is incorrect because modifying nsswitch before configuring the LDAP client could cause name resolution failures if the client isn't properly set up to connect to the LDAP server.
- ✗
1. Modify PAM configuration to include pam_ldap; 2. Install LDAP authentication packages; 3. Configure LDAP client settings; 4. Modify nsswitch.conf to use ldap; 5. Restart services and test authentication.
Why it's wrong here
This order is incorrect because PAM modifications require the packages to be installed first; attempting to modify PAM before installation would fail or have no effect.
- ✗
1. Install LDAP authentication packages; 2. Configure LDAP client settings; 3. Modify PAM configuration to include pam_ldap; 4. Modify nsswitch.conf to use ldap; 5. Restart services and test authentication.
Why it's wrong here
This order is incorrect because nsswitch must be modified before PAM; PAM relies on nsswitch to resolve user identities, so changing PAM first without nsswitch pointing to LDAP would result in authentication failures.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LPIC-2 question from scratch — 507 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 →
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.