Courseiva
Network Client ManagementmediumMultiple ChoiceObjective-mapped

LPIC-2 Network Client Management Practice Question

A Linux client is configured to use PAM for authentication against an LDAP server. The /etc/pam.d/system-auth includes 'auth required pam_ldap.so'. Users can authenticate successfully. However, when a user runs 'id username', it shows 'uid=1000(username) gid=100(users) groups=100(users)' but the LDAP group membership is not shown. Which configuration file is most likely misconfigured?

⚠ Common exam trap

Watch out — candidates often confuse PAM (authentication) with NSS (name resolution), assuming that successful LDAP authentication automatically means LDAP group lookups work, when in fact they are separate subsystems controlled by different configuration files.

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

The /etc/nsswitch.conf 'group' line does not include 'ldap'.

The 'id' command queries the Name Service Switch (NSS) to resolve user and group information. Even though PAM (via pam_ldap.so) successfully authenticates the user against LDAP, the group membership lookup fails because NSS is not configured to consult LDAP for group data. The /etc/nsswitch.conf file must include 'ldap' in the 'group' line (e.g., 'group: files ldap') to enable the system to retrieve LDAP group memberships.

Answer analysis

Option-by-option breakdown

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

  • The PAM configuration uses 'required' instead of 'sufficient' for pam_ldap.

    Why it's wrong here

    PAM module order affects auth, not group info.

  • The /etc/ldap.conf file is missing the 'nss_base_group' line.

    Why it's wrong here

    But group might still be found if base is set; however, the issue is nsswitch.

  • The /etc/nsswitch.conf 'group' line does not include 'ldap'.

    Why this is correct

    Without this, group info comes only from files.

  • The autofs service is not running.

    Why it's wrong here

    Unrelated to group membership.

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

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 →

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.