LPIC-2 File Sharing and Samba Practice Question
An organization uses a Samba server as a standalone file server. The share 'Projects' is configured with browseable = yes and guest ok = no. Users authenticate with local Samba accounts. A new employee needs access but cannot authenticate. The administrator added the user with 'smbpasswd -a newuser' and set a password. When the user tries to connect, they get 'NT_STATUS_LOGON_FAILURE'. The administrator verifies the username and password are correct. smb.conf includes: security = user, passdb backend = tdbsam. What is the most likely cause?
⚠ Common exam trap
Candidates often assume `smbpasswd -a` alone creates a fully functional Samba user, but it only updates the password backend; the underlying Unix account must exist in `/etc/passwd` for authentication to proceed.
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 user account is not in the system's /etc/passwd.
Samba with `passdb backend = tdbsam` stores user credentials in its own TDB database, but it still requires the user to exist as a local system account in `/etc/passwd` (or equivalent) for authentication to succeed. The `smbpasswd -a` command only adds the user to the Samba password database; if the user is not present in `/etc/passwd`, the authentication attempt fails with `NT_STATUS_LOGON_FAILURE` because Samba cannot map the session to a valid Unix UID.
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 'null passwords' parameter is set to 'yes'.
Why it's wrong here
This allows empty passwords but does not cause logon failure for non-empty passwords.
- ✗
The 'map to guest' parameter is set to 'Bad User'.
Why it's wrong here
This maps bad users to guest, but does not cause logon failure; it would allow guest access.
- ✗
The 'encrypt passwords' parameter is set to 'no'.
Why it's wrong here
This is not the default; if set to no, authentication would fail differently.
- ✓
The user account is not in the system's /etc/passwd.
Why this is correct
Samba needs a system account for UID mapping; missing account causes logon failure.
Go deeper
Related to this question
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 →
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.