Courseiva
File Sharing and SambamediumMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice Question

An administrator sets up a Samba server with 'security = user'. Users are stored in the local smbpasswd file. After changing a user's Unix password, the user cannot access Samba shares. What should the administrator do?

⚠ Common exam trap

Candidates often assume changing the Unix password automatically updates the Samba password, or that restarting the service will synchronize them, when in fact they are stored in separate databases and must be updated independently.

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

Run 'smbpasswd username' to set the SMB password.

When Samba is configured with 'security = user', each user must have a separate SMB password stored in the smbpasswd file (or the tdbsam backend). Changing the Unix password does not automatically update the SMB password. Running 'smbpasswd username' sets the SMB password for that user, allowing them to authenticate to Samba shares.

Answer analysis

Option-by-option breakdown

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

  • Add the user to the 'valid users' list.

    Why it's wrong here

    Incorrect; this controls access, not authentication.

  • Run 'smbpasswd username' to set the SMB password.

    Why this is correct

    Correct; SMB passwords are independent of Unix passwords and must be set explicitly.

  • Restart the smbd service.

    Why it's wrong here

    Incorrect; restarting does not update passwords.

  • Run 'pdbedit -u username' to modify the password.

    Why it's wrong here

    Incorrect; pdbedit modifies account settings, not password change.

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.