Courseiva
File Sharing and SambamediumMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice Question

Exhibit

The following output is from 'testparm -v' for a Samba server:

[global]
    workgroup = WORKGROUP
    server string = %h server (Samba, Ubuntu)
    netbios name = SAMBA-SRV
    security = USER
    map to guest = Bad User
    passdb backend = tdbsam
    printing = cups
    printcap name = cups
[share]
    path = /srv/share
    valid users = @staff
    read only = Yes
    guest ok = No

Refer to the exhibit. A user in the group 'staff' attempts to access the share 'share' from a Windows client. The user is prompted for credentials and authenticates successfully, but cannot write any files. What is the most likely reason?

⚠ Common exam trap

The trap here is that candidates often overlook the `read only = Yes` parameter and instead focus on authentication or user inclusion, assuming that successful authentication implies write access, but Samba's share-level read-only flag overrides all user permissions.

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 share has read only = Yes, which prevents writes even for authenticated users.

The `read only = Yes` parameter in a Samba share definition explicitly prevents all write operations, even for authenticated users. When this parameter is set, Samba enforces read-only access at the share level, overriding any user or group permissions that might otherwise allow writes. Since the user authenticates successfully but cannot write, the most direct cause is this share-level restriction.

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 passdb backend is set to tdbsam, which does not support write operations.

    Why it's wrong here

    The passdb backend is for authentication, not file permissions.

  • The share has guest ok = No, which prevents guest access.

    Why it's wrong here

    Guest access is not relevant here; the user authenticated successfully.

  • The valid users parameter does not include the user.

    Why it's wrong here

    The user is in @staff, so they are allowed by valid users.

  • The share has read only = Yes, which prevents writes even for authenticated users.

    Why this is correct

    The 'read only' parameter overrides all write permissions.

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.