Courseiva
File Sharing and SambaeasyMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice Question

After modifying smb.conf, which command should be used to verify the configuration syntax before restarting Samba?

⚠ Common exam trap

Test-takers frequently confuse `testparm` with `smbcontrol reload-config`, thinking that reloading the configuration also validates syntax, but `smbcontrol` does not perform syntax checking and will silently apply a broken configuration if the daemon accepts it, potentially causing undefined behavior.

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 parse and validate the syntax of the Samba configuration file `smb.conf`. It checks for errors such as misspelled parameters, invalid values, or structural issues without requiring the Samba services to be restarted. This ensures that any syntax problems are caught before applying changes to the running Samba daemons (smbd, nmbd, winbindd).

Answer analysis

Option-by-option breakdown

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

  • net conf

    Why it's wrong here

    net conf is used for registry-based configuration.

  • testparm

    Why this is correct

    testparm validates the smb.conf syntax.

  • smbpasswd

    Why it's wrong here

    smbpasswd manages user passwords.

  • smbcontrol

    Why it's wrong here

    smbcontrol sends messages to running daemons.

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.