LX0-104 · Question #306
In the smb.conf file, what does the %S variable mean?
The correct answer is C. The name of the service after the connection has been established.. The %S variable in Samba's smb.conf configuration refers to the name of the current service (share) being accessed by a client after a connection has been successfully established.
Question
Options
- ASession Username
- BThe name of the Samba Server.
- CThe name of the service after the connection has been established.
- DThe local IP address to which the client connected.
How the community answered
(26 responses)- A4% (1)
- B4% (1)
- C92% (24)
Why each option
The `%S` variable in Samba's `smb.conf` configuration refers to the name of the current service (share) being accessed by a client after a connection has been successfully established.
The session username is typically represented by variables like `%U` (current user) or `%u` (if different from `%U`).
The name of the Samba server is usually derived from the machine's hostname or explicitly set with the `netbios name` parameter.
In Samba's `smb.conf` file, `%S` is a special variable that expands to the name of the current service (share) that the client has connected to. This is useful for configuring share-specific behaviors, such as logging or path manipulation, within the global or a specific share section.
The local IP address to which the client connected is not directly represented by `%S`.
Concept tested: Samba `smb.conf` variable expansion
Source: https://www.samba.org/samba/docs/current/manpages/samba.7.html
Topics
Community Discussion
No community discussion yet for this question.