User Tools

Site Tools


ubuntu:samba:verify_samba_configuration_settings

Ubuntu - Samba - Verify Samba configuration settings

Because Samba uses an extremely large amount of parameters in smb.conf, developers have provided a command line tool for verifying the syntax of a configuration file.

This utility is named testparm.

NOTE: It is being mentioned here again so that we do not overlook simple smb.conf errors when hunting for the source of a problem.

testparm

Test a specific Samba configuration file

It is a good idea to run the check on a new configuration file before putting it into production.

  • Specific a specific configuration file by using the -s option.
testparm -s /usr/local/samba/lib/smb.conf.new

returns:

Load smb config files from /usr/local/samba/lib/smb.conf.new
Processing section “[public]”
Loaded services file OK.
# Global parameters
[global]
coding system =
client code page = 850
code page directory = /usr/local/samba/lib/codepages
<...remaining output deleted...>

NOTE: After reviewing the specified configuration file, testparm continues to print a version of smb.conf that contains all parameter values, including default ones.

  • This can help to verify that smbd and nmbd are using the values that you expect.
ubuntu/samba/verify_samba_configuration_settings.txt · Last modified: 2023/06/09 16:45 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki