1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="testparm.1">
6 <refentrytitle>testparm</refentrytitle>
7 <manvolnum>1</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">User Commands</refmiscinfo>
10 <refmiscinfo class="version">&doc.version;</refmiscinfo>
15 <refname>testparm</refname>
16 <refpurpose>check an smb.conf configuration file for
17 internal correctness</refpurpose>
22 <command>testparm</command>
23 <arg choice="opt">-s|--suppress-prompt</arg>
24 <arg choice="opt">-v|--verbose</arg>
25 <arg choice="opt">-?|--help</arg>
26 <arg choice="opt">--usage</arg>
27 <arg choice="opt">-d|--debuglevel=DEBUGLEVEL</arg>
28 <arg choice="opt">--debug-stdout</arg>
29 <arg choice="req">config filename</arg>
30 <arg choice="opt">hostname hostIP</arg>
35 <title>DESCRIPTION</title>
37 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
38 <manvolnum>7</manvolnum></citerefentry> suite.</para>
40 <para><command>testparm</command> is a very simple test program
41 to check an <citerefentry><refentrytitle>smbd</refentrytitle>
42 <manvolnum>8</manvolnum></citerefentry> configuration file for
43 internal correctness. If this program reports no problems, you
44 can use the configuration file with confidence that <command>smbd
45 </command> will successfully load the configuration file.</para>
48 <para>Note that this is <emphasis>NOT</emphasis> a guarantee that
49 the services specified in the configuration file will be
50 available or will operate as expected. </para>
52 <para>If the optional host name and host IP address are
53 specified on the command line, this test program will run through
54 the service entries reporting whether the specified host
55 has access to each service. </para>
57 <para>If <command>testparm</command> finds an error in the <filename>
58 smb.conf</filename> file it returns an exit code of 1 to the calling
59 program, else it returns an exit code of 0. This allows shell scripts
60 to test the output from <command>testparm</command>.</para>
64 <title>OPTIONS</title>
68 <term>-s|--suppress-prompt</term>
69 <listitem><para>Without this option, <command>testparm</command>
70 will prompt for a carriage return after printing the service
71 names and before dumping the service definitions.</para></listitem>
75 <term>-v|--verbose</term>
76 <listitem><para>If this option is specified, testparm
77 will also output all options that were not used in <citerefentry>
78 <refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
79 </citerefentry> and are thus set to their defaults.</para></listitem>
83 <term>--parameter-name parametername</term>
85 Dumps the named parameter. If no section-name is set the view
86 is limited by default to the global section.
88 It is also possible to dump a parametrical option. Therefore
89 the option has to be separated by a colon from the
95 <term>--section-name sectionname</term>
97 Dumps the named section.
102 <term>--show-all-parameters</term>
104 Show the parameters, type, possible values.
109 <term>-l|--skip-logic-checks</term>
111 Skip the global checks.
116 &cmdline.common.debug.client;
117 &cmdline.common.config.client;
118 &cmdline.common.option;
122 <term>configfilename</term>
123 <listitem><para>This is the name of the configuration file
124 to check. If this parameter is not present then the
125 default <citerefentry><refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
126 </citerefentry> file will be checked.
132 <term>hostname</term>
133 <listitem><para>If this parameter and the following are
134 specified, then <command>testparm</command> will examine the <parameter>hosts
135 allow</parameter> and <parameter>hosts deny</parameter>
136 parameters in the <citerefentry>
137 <refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
138 </citerefentry> file to
139 determine if the hostname with this IP address would be
140 allowed access to the <command>smbd</command> server. If
141 this parameter is supplied, the hostIP parameter must also
142 be supplied.</para></listitem>
148 <listitem><para>This is the IP address of the host specified
149 in the previous parameter. This address must be supplied
150 if the hostname parameter is supplied. </para></listitem>
160 <term><citerefentry><refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
161 </citerefentry></term>
162 <listitem><para>This is usually the name of the configuration
163 file used by <citerefentry><refentrytitle>smbd</refentrytitle><manvolnum>8</manvolnum>
171 <title>DIAGNOSTICS</title>
173 <para>The program will issue a message saying whether the
174 configuration file loaded OK or not. This message may be preceded by
175 errors and warnings if the file did not load. If the file was
176 loaded OK, the program then dumps all known service details
179 <para>For certain use cases, SMB protocol requires use of
180 cryptographic algorithms which are known to be weak and already
181 broken. DES and ARCFOUR (RC4) ciphers and the SHA1 and MD5 hash
182 algorithms are considered weak but they are required for backward
183 compatibility. The testparm utility shows whether the Samba tools
184 will fall back to these weak crypto algorithms if it is not possible
185 to use strong cryptography by default.
186 In FIPS mode weak crypto cannot be enabled.</para>
191 <title>VERSION</title>
193 <para>This man page is part of version &doc.version; of
194 the Samba suite.</para>
198 <title>SEE ALSO</title>
200 <refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
201 </citerefentry>, <citerefentry>
202 <refentrytitle>smbd</refentrytitle><manvolnum>8</manvolnum>
203 </citerefentry></para>
207 <title>AUTHOR</title>
209 <para>The original Samba software and related utilities
210 were created by Andrew Tridgell. Samba is now developed
211 by the Samba Team as an Open Source project similar
212 to the way the Linux kernel is developed.</para>