User Tools

Site Tools


samba:verify_samba_configuration_settings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
samba:verify_samba_configuration_settings [2019/12/04 19:54] – removed petersamba:verify_samba_configuration_settings [2020/07/23 19:08] (current) – old revision restored (2016/07/10 10:02) 192.99.15.199
Line 1: Line 1:
 +====== 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.  The utility, named testparm.
 +
 +It is being mentioned here again so that we do not overlook simple smb.conf errors when hunting for the source of a problem.
 +
 +<code bash>
 +testparm
 +</code>
 +
 +**NOTE**:  Can be instructed to parse a specific configuration file by using the **-s** option.
 +
 +It is a good idea to run the check on a new configuration file before putting it into production.
 +
 +<code bash>
 +testparm -s /usr/local/samba/lib/smb.conf.new
 +</code>
 +
 +Result:
 +
 +<code>
 +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...>
 +</code>
 +
 +
 +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.
  
samba/verify_samba_configuration_settings.1575489272.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki