LPIC-2 File Sharing and Samba Practice Question
After modifying /etc/samba/smb.conf, an administrator runs a command to validate the configuration. Which command is correct?
⚠ Common exam trap
It's easy for candidates to confuse `testparm` with `smbcontrol reload-config` or `samba-tool`, thinking that reloading or using a domain tool also validates the configuration, but only `testparm` performs a dedicated syntax check without affecting running services.
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
✓
testparm
The correct command is `testparm`, which is specifically designed to validate the syntax and configuration of the `/etc/samba/smb.conf` file. It checks for errors in parameters, missing sections, and logical inconsistencies without restarting the Samba services, making it the standard tool for configuration verification.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
testparm
Why this is correct
testparm validates the smb.conf file for syntax errors.
- ✗
smbpasswd
Why it's wrong here
smbpasswd manages Samba user passwords.
- ✗
smbcontrol
Why it's wrong here
smbcontrol sends messages to running Samba daemons.
- ✗
samba-tool
Why it's wrong here
samba-tool is used for domain management tasks, not configuration file validation.
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.