Yes. Samba can use SMB signing, but whether it is enabled—and whether it is required—depends on the Samba version, the server role, and the configuration. On current Samba releases, set the appropriate signing option in smb.conf, then verify the effective settings and test a client connection; do not assume that enabling signing on the server forces every client to use it.
What SMB signing does
SMB signing adds a cryptographic signature to SMB messages. The receiving side checks the signature to detect changes to a message in transit and to confirm that it came from a party holding the session key. It is an integrity and authenticity measure, not encryption: signing does not hide file contents or credentials. Use SMB encryption, such as SMB3 encryption, when confidentiality is also required.
Signing can help defend against certain tampering and relay-related attacks, particularly on networks where an attacker might intercept or alter traffic. Its protections depend on a successful, authenticated SMB session and the client and server negotiating signing. It does not make an insecure network or weak account password safe by itself.
How Samba signing settings work
Samba’s smb.conf configuration uses server signing to control signing behavior for the server. Common values are:
default: use Samba’s default behavior, which can vary by release and context.auto: negotiate signing when the client supports or requests it, without requiring it in every case.mandatory: require signing; connections that cannot meet the requirement should fail.disabled: do not use signing. Avoid this unless you have a specific, assessed compatibility reason.
For a standalone file server, a typical explicit requirement is server signing = mandatory in the [global] section. Samba’s accepted options and defaults can differ between versions, so check the manual page installed with your release before applying a value. Do not confuse the server-side parameter with client-side settings: a Samba machine acting as an SMB client has separate client behavior and configuration.
Enable signing in smb.conf
Back up the configuration first. The usual file is /etc/samba/smb.conf, although distributions and containers may use another path. Add or adjust the setting under [global], not under an individual share:
[global]
server signing = mandatory
Then check the configuration and reload or restart the relevant Samba services using the method provided by your operating system. For example, testparm checks Samba’s configuration syntax and reports its parsed settings. A systemd-based installation may use sudo systemctl reload smbd if the service supports reload; otherwise use the distribution’s documented restart procedure. On installations using different service names or an appliance interface, follow that platform’s instructions instead.
Useful checks include:
- Run
testparm -sand inspect the global configuration it displays. This confirms what Samba parsed, not that a remote client negotiated signing. - Review the service status and logs after reloading. Correct any syntax or startup errors before testing access.
- Connect from a representative client and inspect the negotiated SMB session using an appropriate client tool or packet-analysis method. Check the tool’s documentation for how it reports signing; a configuration value alone is not proof of a signed connection.
Choose between optional and required signing
Requiring signing gives a clearer security guarantee for successful connections, but it can expose old clients, embedded devices, or applications that do not support signing or are configured not to use it. Optional negotiation can preserve more compatibility, but it may allow a connection without signing when the client does not request it. The right choice depends on the security policy and the actual devices that must access the server.
Before enforcing the setting on a production file server, inventory clients and test them in a representative environment. Check Windows computers, Linux systems, printers, scanners, backup appliances, and any software that accesses SMB directly. If one device fails, determine whether it supports signing and whether its own policy disables it; do not immediately weaken the server-wide policy.
Version, domain, and client considerations
Samba behavior is version-sensitive. The available parameter values, defaults, and interactions with other SMB security options can change, and Samba’s role matters. A standalone server, an Active Directory domain member, and a Samba AD domain controller do not necessarily have identical operational requirements. Consult the documentation for the exact installed Samba release and test changes in the role and environment you use.
Signing negotiation also involves the client. A server setting cannot make an incapable client support signing, and a client-side policy can prevent a connection to a server that requires it. Windows has its own SMB client and server signing policies; those settings are configured independently from Samba. On Linux, behavior depends on the SMB client implementation and its options. Confirm the negotiated connection rather than inferring it from either side’s configuration.
Common problems and misconceptions
- “Signing is encryption.” It is not. Signed SMB traffic can still be readable to someone who can observe the network. Use SMB encryption or another suitable protected transport when confidentiality is needed.
- “The setting appears in smb.conf, so signing is active.” The setting shows intent. The client must connect successfully and negotiate the feature; verify the session.
- “Mandatory signing breaks Samba itself.” It may instead reveal an incompatible client or a conflicting client policy. Use logs and a targeted test to identify the failing endpoint.
- “Disabling signing is a harmless performance fix.” It removes an integrity safeguard. Measure the actual performance issue and consider hardware, network latency, protocol version, and workload before changing security policy.
When troubleshooting, note the Samba version, server role, client operating system, and exact error. Test one configuration change at a time, and avoid leaving signing disabled as a temporary workaround. If a legacy device truly cannot sign, isolate it and assess the risk rather than treating the exception as safe for the whole server.
Frequently Asked Questions
Does Samba enable SMB signing by default?
There is no safe universal answer for every Samba release and server setup. Defaults can differ with version and context; check the installed version’s documentation and effective configuration, then verify a real session.
What setting requires SMB signing on a Samba server?
For server-side connections, the commonly used setting is server signing = mandatory in [global]. Confirm that this value is supported and appropriate for your Samba version and role.
Does server signing enable signing for Samba client connections?
No. server signing governs Samba acting as an SMB server. When the Samba host connects to another SMB server, client-side configuration and negotiation apply.
How can I tell whether an SMB connection is signed?
Check the negotiated session with a client tool or network-analysis tool that reports SMB signing, and consult its documentation. testparm verifies parsed configuration, not the security state of a particular connection.
Should I require signing or leave it optional?
Require it when your security policy calls for signed SMB traffic and your clients support it. If compatibility is uncertain, test clients first; optional negotiation may allow unsigned sessions and is not equivalent to a requirement.