Courseiva
File Sharing and SambamediumMultiple SelectObjective-mapped

LPIC-2 username map Practice Question

Which TWO of the following are valid ways to map a Windows user to a Linux account in Samba?

⚠ Common exam trap

Candidates often confuse 'force user' (which overrides the authenticated user for file operations) with a mapping mechanism, when in fact it does not map Windows users to Linux accounts but instead forces all connections to run as a specific Linux 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

Using a 'username map' file specified by the 'username map' parameter

The 'username map' parameter in smb.conf specifies a file (e.g., /etc/samba/smbusers) that maps Windows usernames to Linux usernames, allowing Samba to translate incoming Windows user credentials to a corresponding Linux account. Option B is correct because 'force user' in a share definition forces all connections to that share to run as a specific Linux user, effectively mapping any Windows user to that Linux account for file operations. Both are valid ways to map Windows users to Linux accounts in Samba.

Answer analysis

Option-by-option breakdown

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

  • Using a 'username map' file specified by the 'username map' parameter

    Why this is correct

    Maps Windows usernames to Linux usernames

  • Using 'force user' in the share definition

    Why this is correct

    Maps all connections to a specific Linux user

  • Using the 'map user' command in smbpasswd

    Why it's wrong here

    No such command

  • Setting 'winbind use default domain = yes'

    Why it's wrong here

    Affects domain name, not mapping

  • Using the 'valid users' directive in smb.conf

    Why it's wrong here

    Controls access, not mapping

About these practice questions

This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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.