Courseiva
File Sharing and SambaeasyMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice Question

A small office uses a Samba server for file sharing. The server is running Samba 4.9 on Ubuntu 18.04. Recently, the administrator added a new user 'john' to the system and added him to the 'staff' group. However, when John tries to access the share 'docs' from his Windows laptop, he gets an 'Access Denied' error. The share configuration is:

[docs]

path = /srv/docs valid users = @staff read only = No create mask = 0644 directory mask = 0755

The administrator verifies that John is a member of the staff group by running 'groups john' which shows staff. Other users in staff can access the share. What is the most likely cause?

⚠ Common exam trap

Test-takers frequently assume Samba must be restarted or that the share configuration is incorrect, when in fact the issue is client-side credential caching—a subtle but critical detail in Samba troubleshooting.

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

John's Windows credentials are cached from a previous failed attempt.

Samba caches user credentials and group memberships at the time of the initial connection. When John first attempted to access the share, Samba cached his credentials (including group membership) before he was added to the staff group. Even though the system now shows John as a member of staff, Samba continues to use the cached credentials, resulting in 'Access Denied'. Clearing the cached credentials on the Windows client (e.g., via 'net use * /delete' or Credential Manager) forces a fresh authentication and group lookup.

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 create mask is too restrictive for John's files.

    Why it's wrong here

    create mask applies to new files, not access permissions.

  • The valid users parameter requires the group to be listed with a plus sign for domain groups.

    Why it's wrong here

    The group is a local UNIX group, not a domain group.

  • John's Windows credentials are cached from a previous failed attempt.

    Why this is correct

    Cached credentials can cause access denied; clearing them resolves the issue.

  • The Samba service needs to be restarted to reload the group membership.

    Why it's wrong here

    Samba dynamically reads group membership; restart is not required.

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.