Courseiva
File Sharing and SambahardMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice Question

You are the administrator for a small office network with 20 Linux workstations and 5 Windows 10 clients. The company uses a Samba server (version 4.15) running on Ubuntu 22.04 to share a central directory /data with user-level security. Each user has a home directory on the server, and all users are in the 'staff' group. Recently, users have complained that they can access the /data share from Windows but cannot modify any files, even though they could before. The Samba configuration for the share is:

[data]

path = /data browseable = yes read only = no valid users = @staff create mask = 0660 directory mask = 0770 force group = staff

You check the filesystem permissions on /data and find it is owned by root:staff with permissions 775. Files inside are owned by individual users and group staff with permissions 664. You also check smbstatus and see that users are connected as 'guest' rather than their actual username. What is the most likely cause of the problem?

⚠ Common exam trap

The trap here is that candidates often focus on filesystem permissions or mask values, overlooking the global 'map to guest' setting which silently downgrades authenticated users to guest, stripping write access despite correct share-level 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 global 'map to guest = Bad User' setting is causing users who mistype their password to be mapped to the guest account, losing write permissions.

The 'map to guest = Bad User' global setting in Samba causes any user who fails authentication (e.g., due to a typo or incorrect password) to be mapped to the guest account. Since the share does not define a 'guest ok' or 'guest only' setting, and the guest account typically has no write permissions on the /data directory, users connected as guest cannot modify files. The smbstatus output confirming users are connected as 'guest' directly points to this misconfiguration.

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 'valid users = @staff' directive excludes root, so users cannot write because the share is owned by root.

    Why it's wrong here

    Incorrect. valid users controls access, not ownership. Root is not a user in staff, but users are staff.

  • The 'force group = staff' parameter overrides file ownership and prevents writes because the files are owned by root.

    Why it's wrong here

    Incorrect. force group changes group, but ownership remains; with 664 permissions, group can write.

  • The global 'map to guest = Bad User' setting is causing users who mistype their password to be mapped to the guest account, losing write permissions.

    Why this is correct

    Correct. This is a common misconfiguration; users connect as guest if password fails, and guest may not have write access.

  • The 'create mask = 0660' is too restrictive and prevents users from writing to existing files.

    Why it's wrong here

    Incorrect. Create mask only affects new files, not existing ones.

About these practice questions

One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.