Courseiva
File Sharing and SambaeasyMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice Question

Exhibit

[global]
   workgroup = WORKGROUP
   server string = %h server
   security = user
   map to guest = Bad User
   log file = /var/log/samba/log.%m
   max log size = 50

[public]
   path = /srv/samba/public
   guest ok = yes
   read only = yes
   browseable = yes

Refer to the exhibit. A user attempts to access the 'public' share without authentication. What will be the outcome?

⚠ Common exam trap

A common mix-up: candidates assume `security = user` always blocks unauthenticated access, overlooking the fact that `map to guest = Bad User` can override this by redirecting failed logins to the guest account, especially when combined with `guest ok = yes`.

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

Access granted as guest because map to guest = Bad User and guest ok = yes

The Samba configuration combines `map to guest = Bad User` with `guest ok = yes`. When a user attempts to access the 'public' share without authentication, Samba treats the connection as a guest due to the 'Bad User' mapping (since no valid credentials were provided). The `guest ok = yes` directive then explicitly grants access to the share, allowing the user to connect as the guest account (typically 'nobody').

Answer analysis

Option-by-option breakdown

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

  • Access denied because security = user

    Why it's wrong here

    Incorrect; map to guest overrides this.

  • Access granted as guest because map to guest = Bad User and guest ok = yes

    Why this is correct

    Correct; guest access is enabled.

  • Access denied because read only = yes

    Why it's wrong here

    Incorrect; read only only prevents writes, not reads.

  • Access granted with full read/write because guest ok = yes

    Why it's wrong here

    Incorrect; read only = yes restricts to read-only.

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.