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