Courseiva
File Sharing and SambahardMultiple ChoiceObjective-mapped

LPIC-2 File Sharing and Samba Practice Question

A Samba server is configured as a classic PDC (Primary Domain Controller) for a legacy network. The administrator needs to add a new machine account for a client joining the domain. Which command accomplishes this?

⚠ Common exam trap

Many exam-takers confuse the classic Samba PDC (NT4-style) commands with Samba 4 AD DC commands, or misuse client-side join commands (`net rpc join`) as server-side machine account creation commands.

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

smbpasswd -a -m MACHINENAME

In a classic Samba PDC (Primary Domain Controller) setup, machine accounts are stored in the `smbpasswd` file (or tdbsam) and are added using `smbpasswd -a -m MACHINENAME`. The `-m` flag specifically indicates a machine account, which appends a `$` to the name and sets the appropriate flags for domain membership. This command creates the machine trust account that the client uses to join the domain.

Answer analysis

Option-by-option breakdown

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

  • samba-tool domain add machinename

    Why it's wrong here

    This is for AD domains, not classic PDC.

  • smbpasswd -a -m MACHINENAME

    Why this is correct

    The -m flag indicates a machine account.

  • net rpc join machinename

    Why it's wrong here

    This joins the server to a domain, not adds a machine account.

  • pdbedit -a -m MACHINENAME

    Why it's wrong here

    pdbedit does not have a -m flag; machine accounts are added with -a and -u machine$.

About these practice questions

One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.