1TESTPARM(1) User Commands TESTPARM(1)
2
3
4
6 testparm - check an smb.conf configuration file for internal
7 correctness
8
10 testparm [-s|--suppress-prompt] [-v|--verbose] [-?|--help] [--usage]
11 [-d|--debuglevel=DEBUGLEVEL] [--debug-stdout] {config filename}
12 [hostname hostIP]
13
15 This tool is part of the samba(7) suite.
16
17 testparm is a very simple test program to check an smbd(8)
18 configuration file for internal correctness. If this program reports no
19 problems, you can use the configuration file with confidence that smbd
20 will successfully load the configuration file.
21
22 Note that this is NOT a guarantee that the services specified in the
23 configuration file will be available or will operate as expected.
24
25 If the optional host name and host IP address are specified on the
26 command line, this test program will run through the service entries
27 reporting whether the specified host has access to each service.
28
29 If testparm finds an error in the smb.conf file it returns an exit code
30 of 1 to the calling program, else it returns an exit code of 0. This
31 allows shell scripts to test the output from testparm.
32
34 -s|--suppress-prompt
35 Without this option, testparm will prompt for a carriage return
36 after printing the service names and before dumping the service
37 definitions.
38
39 -v|--verbose
40 If this option is specified, testparm will also output all options
41 that were not used in smb.conf(5) and are thus set to their
42 defaults.
43
44 --parameter-name parametername
45 Dumps the named parameter. If no section-name is set the view is
46 limited by default to the global section. It is also possible to
47 dump a parametrical option. Therefore the option has to be
48 separated by a colon from the parametername.
49
50 --section-name sectionname
51 Dumps the named section.
52
53 --show-all-parameters
54 Show the parameters, type, possible values.
55
56 -l|--skip-logic-checks
57 Skip the global checks.
58
59 -?|--help
60 Print a summary of command line options.
61
62 --usage
63 Display brief usage message.
64
65 -d|--debuglevel=DEBUGLEVEL
66 level is an integer from 0 to 10. The default value if this
67 parameter is not specified is 1 for client applications.
68
69 The higher this value, the more detail will be logged to the log
70 files about the activities of the server. At level 0, only critical
71 errors and serious warnings will be logged. Level 1 is a reasonable
72 level for day-to-day running - it generates a small amount of
73 information about operations carried out.
74
75 Levels above 1 will generate considerable amounts of log data, and
76 should only be used when investigating a problem. Levels above 3
77 are designed for use only by developers and generate HUGE amounts
78 of log data, most of which is extremely cryptic.
79
80 Note that specifying this parameter here will override the log
81 level parameter in the /etc/samba/smb.conf file.
82
83 --debug-stdout
84 This will redirect debug output to STDOUT. By default all clients
85 are logging to STDERR.
86
87 --configfile=<configuration file>
88 The file specified contains the configuration details required by
89 the client. The information in this file can be general for client
90 and server or only provide client specific like options such as
91 client smb encrypt. See /etc/samba/smb.conf for more information.
92 The default configuration file name is determined at compile time.
93
94 --option=<name>=<value>
95 Set the smb.conf(5) option "<name>" to value "<value>" from the
96 command line. This overrides compiled-in defaults and options read
97 from the configuration file. If a name or a value includes a space,
98 wrap whole --option=name=value into quotes.
99
100 -V|--version
101 Prints the program version number.
102
103 configfilename
104 This is the name of the configuration file to check. If this
105 parameter is not present then the default smb.conf(5) file will be
106 checked.
107
108 hostname
109 If this parameter and the following are specified, then testparm
110 will examine the hosts allow and hosts deny parameters in the
111 smb.conf(5) file to determine if the hostname with this IP address
112 would be allowed access to the smbd server. If this parameter is
113 supplied, the hostIP parameter must also be supplied.
114
115 hostIP
116 This is the IP address of the host specified in the previous
117 parameter. This address must be supplied if the hostname parameter
118 is supplied.
119
121 smb.conf(5)
122 This is usually the name of the configuration file used by smbd(8).
123
125 The program will issue a message saying whether the configuration file
126 loaded OK or not. This message may be preceded by errors and warnings
127 if the file did not load. If the file was loaded OK, the program then
128 dumps all known service details to stdout.
129
130 For certain use cases, SMB protocol requires use of cryptographic
131 algorithms which are known to be weak and already broken. DES and
132 ARCFOUR (RC4) ciphers and the SHA1 and MD5 hash algorithms are
133 considered weak but they are required for backward compatibility. The
134 testparm utility shows whether the Samba tools will fall back to these
135 weak crypto algorithms if it is not possible to use strong cryptography
136 by default. In FIPS mode weak crypto cannot be enabled.
137
139 This man page is part of version 4.17.5 of the Samba suite.
140
142 smb.conf(5), smbd(8)
143
145 The original Samba software and related utilities were created by
146 Andrew Tridgell. Samba is now developed by the Samba Team as an Open
147 Source project similar to the way the Linux kernel is developed.
148
149
150
151Samba 4.17.5 01/26/2023 TESTPARM(1)