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.
Question
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)- A8% (3)
- B86% (31)
- D6% (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.
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.
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.
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.
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.
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
Community Discussion
No community discussion yet for this question.