nerdexam
Linux_Foundation

LFCS · Question #319

The text below is an excerpt of the Samba main configuration file. Select the THREE correct statements: [global] logon script = logon.cmd [netlogon] path = /var/lib/samba/netlogon read only = yes…

The correct answer is B. The file excerpt shows that Samba will instruct the client to execute a logon script in order to prepare C. The logon script directive is always relative to the [netlogon] share. E. Samba doesn't provide the logon.cmd script contents. This Samba configuration snippet defines a logon script that clients will execute from the netlogon share, which is configured to be writable only by the root user.

Submitted by javi_es· Apr 18, 2026Service Configuration

Question

The text below is an excerpt of the Samba main configuration file. Select the THREE correct statements: [global] logon script = logon.cmd [netlogon] path = /var/lib/samba/netlogon read only = yes write list = root

Options

  • AThe logon script has to be in ASCII Linux format.
  • BThe file excerpt shows that Samba will instruct the client to execute a logon script in order to prepare
  • CThe logon script directive is always relative to the [netlogon] share.
  • DAny user can modify the logon.cmd script.
  • ESamba doesn't provide the logon.cmd script contents.

How the community answered

(36 responses)
  • A
    8% (3)
  • B
    86% (31)
  • D
    6% (2)

Why each option

This Samba configuration snippet defines a logon script that clients will execute from the `netlogon` share, which is configured to be writable only by the root user.

AThe logon script has to be in ASCII Linux format.

While some scripts might run in Linux environments, logon scripts intended for Windows clients need to be in a format compatible with Windows (e.g., DOS/Windows line endings), not necessarily ASCII Linux format.

BThe file excerpt shows that Samba will instruct the client to execute a logon script in order to prepareCorrect

The `logon script = logon.cmd` directive in the `[global]` section instructs Windows clients connecting to the Samba server to execute the specified `logon.cmd` script upon login, preparing their environment.

CThe logon script directive is always relative to the [netlogon] share.Correct

The `logon script` directive is always interpreted as a path relative to the `[netlogon]` share's configured `path`. Therefore, `logon.cmd` must reside within `/var/lib/samba/netlogon` to be accessible.

DAny user can modify the logon.cmd script.

The `write list = root` parameter configured for the `[netlogon]` share explicitly restricts write access to only the 'root' user, meaning no other user can modify the `logon.cmd` script.

ESamba doesn't provide the logon.cmd script contents.Correct

Samba is a file server and does not inherently provide the content for logon scripts; the administrator is responsible for creating and populating the `logon.cmd` file with the desired commands.

Concept tested: Samba logon script and netlogon share configuration

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

Topics

#Samba configuration#Logon scripts#Network shares#File permissions

Community Discussion

No community discussion yet for this question.

Full LFCS Practice