300-300 · Question #45
When configuring an OpenLDAP system for integration with PAM and NSS the /etc/nsswitch.conf file needs to be modified. Which of the following parameters completes this line from the…
The correct answer is B. ldap. Option B (ldap) is correct because /etc/nsswitch.conf maps name service lookups to their data sources, and ldap is the recognized keyword that tells NSS to query an LDAP directory. The complete line passwd: files ldap instructs the system to first check local /etc/passwd files…
Question
Options
- Apam
- Bldap
- Cpam_nss
- Dpam_ldap
- Enone
How the community answered
(52 responses)- A2% (1)
- B77% (40)
- C2% (1)
- D13% (7)
- E6% (3)
Explanation
Option B (ldap) is correct because /etc/nsswitch.conf maps name service lookups to their data sources, and ldap is the recognized keyword that tells NSS to query an LDAP directory. The complete line passwd: files ldap instructs the system to first check local /etc/passwd files, then fall back to LDAP for user account lookups.
Why the distractors are wrong:
- A (pam) - PAM is an authentication framework, not a name service source. It handles how users authenticate, not where user/group data is looked up.
- C (pam_nss) - This is not a valid NSS database keyword at all; it conflates two separate subsystems.
- D (pam_ldap) -
pam_ldapis a PAM module (configured in/etc/pam.d/), not annsswitch.confsource identifier. - E (none) - Omitting an LDAP source means the system would never consult the directory for passwd lookups, breaking the integration entirely.
Memory tip: Think of nsswitch.conf as a lookup routing table - it only understands data source names (files, ldap, dns, nis), never PAM module names. If it sounds like a module (pam_*), it belongs in /etc/pam.d/, not here.
Topics
Community Discussion
No community discussion yet for this question.