Question 266 of 511
File Sharing and SambamediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is jane. When the Samba force user directive is set to a specific user, it overrides the authenticated user’s identity for all file operations on that share, so even though bob connects, the effective user ID becomes jane for every read, write, and ownership check. This behavior is a core concept tested on the Linux Professional Institute Certification Level 2 LPIC-2 exam, often appearing in scenario-based questions where you must distinguish between the connecting user and the forced user. A common trap is assuming bob’s own permissions apply, but the directive explicitly replaces the effective user ID, meaning all created files will be owned by jane. Remember the mnemonic: “force user forces the file owner, not the login.”

LPIC-2 File Sharing and Samba Practice Question

This LPIC-2 practice question tests your understanding of file sharing and samba. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A Samba share is configured with 'force user = jane'. A user 'bob' accesses the share. With what effective user ID will file operations be performed?

Question 1mediummultiple choice
Full question →

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

jane

The 'force user' directive in Samba overrides the authenticated user's identity for all file operations on the share. When 'force user = jane' is set, any user accessing the share, including 'bob', will have their effective user ID changed to 'jane' for all file reads, writes, and ownership checks. This ensures that files created or modified on the share are owned by 'jane', regardless of who actually connects.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • root

    Why it's wrong here

    Only if force user is set to root.

  • jane

    Why this is correct

    All file operations use the forced user 'jane'.

    Related concept

    Read the scenario before looking for a memorised answer.

  • nobody

    Why it's wrong here

    nobody is used for guest access.

  • bob

    Why it's wrong here

    force user overrides the connecting user.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often confuse 'force user' with 'valid users' or 'guest only', mistakenly thinking the connecting user's identity is preserved for file operations, when in fact 'force user' completely overrides the effective UID.

Detailed technical explanation

How to think about this question

Under the hood, Samba's 'force user' works by calling setuid() or seteuid() to the specified user's UID after authentication but before any file system access. This is similar to the Unix 'su' command but applied per-connection. A subtle behavior is that 'force user' does not affect the authentication process itself—bob must still provide valid credentials—but once connected, all file operations run as 'jane', which can cause permission issues if 'jane' lacks access to directories bob expects to use.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the LPIC-2 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related LPIC-2 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free LPIC-2 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this LPIC-2 question test?

File Sharing and Samba — This question tests File Sharing and Samba — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: jane — The 'force user' directive in Samba overrides the authenticated user's identity for all file operations on the share. When 'force user = jane' is set, any user accessing the share, including 'bob', will have their effective user ID changed to 'jane' for all file reads, writes, and ownership checks. This ensures that files created or modified on the share are owned by 'jane', regardless of who actually connects.

What should I do if I get this LPIC-2 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.