nerdexam
Linux_Foundation

LFCS · Question #121

To avoid having to add a machine trust account to a PDC for each Windows client in the domain (using the useradd command), a directive can be used in the Samba configuration file. Select the option…

The correct answer is C. add machine script. To automate the creation of machine trust accounts for Windows clients in a Samba domain, the add machine script directive is used in the Samba configuration.

Submitted by obi.ng· Apr 18, 2026Service Configuration

Question

To avoid having to add a machine trust account to a PDC for each Windows client in the domain (using the useradd command), a directive can be used in the Samba configuration file. Select the option below that shows the best solution for this situation.

Options

  • Aname resolve order = <correct order>
  • Bmachine map = /etc/samba/machines
  • Cadd machine script
  • Dlogon script
  • Eread only = no

How the community answered

(45 responses)
  • A
    7% (3)
  • B
    4% (2)
  • C
    87% (39)
  • D
    2% (1)

Why each option

To automate the creation of machine trust accounts for Windows clients in a Samba domain, the `add machine script` directive is used in the Samba configuration.

Aname resolve order = <correct order>

`name resolve order` defines the sequence in which Samba attempts to resolve NetBIOS names to IP addresses, which is unrelated to machine trust account creation.

Bmachine map = /etc/samba/machines

`machine map` is not a standard Samba directive for automatically adding machine trust accounts; there is no direct equivalent or common usage for this purpose as described.

Cadd machine scriptCorrect

The `add machine script` parameter in `smb.conf` allows an administrator to define a script that Samba will execute when a new Windows client attempts to join the domain and register its machine account. This script typically handles the creation of the necessary trust account without requiring manual intervention for each client, streamlining domain integration.

Dlogon script

A `logon script` is executed on the client machine upon user login and is used for client-side configuration, not server-side machine account provisioning.

Eread only = no

`read only = no` sets a share to be writable, which has no bearing on the automatic creation of machine trust accounts for domain membership.

Concept tested: Samba machine trust account automation

Source: https://www.samba.org/samba/docs/current/manpages-3/smb.conf.5.html

Topics

#Samba#Machine Accounts#Domain Controller#Service Configuration

Community Discussion

No community discussion yet for this question.

Full LFCS Practice