LPIC-2 Network Client Management Practice Question
An administrator wants to restrict access to a service using PAM. Which file order determines the authentication flow for a service?
⚠ Common exam trap
Watch out — candidates often confuse the PAM service configuration directory (/etc/pam.d/) with the legacy monolithic /etc/pam.conf or with unrelated system configuration files like /etc/nsswitch.conf or /etc/security/access.conf, which serve entirely different purposes in the authentication or name resolution pipeline.
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
✓
/etc/pam.d/<service-name>
PAM (Pluggable Authentication Modules) uses per-service configuration files located in /etc/pam.d/ to define the authentication flow. When a service (e.g., sshd, login) calls PAM, it reads the file named after the service (e.g., /etc/pam.d/sshd) to determine the order of modules (auth, account, password, session) and their control flags (required, requisite, sufficient, optional). This file-based approach allows fine-grained, service-specific authentication policies.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
/etc/pam.d/<service-name>
Why this is correct
Each service has its own PAM configuration file in /etc/pam.d/.
- ✗
/etc/nsswitch.conf
Why it's wrong here
This controls name service lookups, not authentication.
- ✗
/etc/security/access.conf
Why it's wrong here
This is an access control file, not the primary PAM configuration.
- ✗
/etc/pam.conf
Why it's wrong here
Although used, /etc/pam.d/ is preferred on modern systems.
Go deeper
Related to this question
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 →
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.