1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="testparm">
5 <refentrytitle>testparm</refentrytitle>
6 <manvolnum>1</manvolnum>
11 <refname>testparm</refname>
12 <refpurpose>check an smb.conf configuration file for
13 internal correctness</refpurpose>
18 <command>testparm</command>
19 <arg choice="opt">-s</arg>
20 <arg choice="opt">-h</arg>
21 <arg choice="opt">-v</arg>
22 <arg choice="opt">-L <servername></arg>
23 <arg choice="opt">-t <encoding></arg>
24 <arg choice="req">config filename</arg>
25 <arg choice="opt">hostname hostIP</arg>
30 <title>DESCRIPTION</title>
32 <para>This tool is part of the <ulink url="samba.7.html">
33 Samba</ulink> suite.</para>
35 <para><command>testparm</command> is a very simple test program
36 to check an <command>smbd</command> configuration file for
37 internal correctness. If this program reports no problems, you
38 can use the configuration file with confidence that <command>smbd
39 </command> will successfully load the configuration file.</para>
42 <para>Note that this is <emphasis>NOT</emphasis> a guarantee that
43 the services specified in the configuration file will be
44 available or will operate as expected. </para>
46 <para>If the optional host name and host IP address are
47 specified on the command line, this test program will run through
48 the service entries reporting whether the specified host
49 has access to each service. </para>
51 <para>If <command>testparm</command> finds an error in the <filename>
52 smb.conf</filename> file it returns an exit code of 1 to the calling
53 program, else it returns an exit code of 0. This allows shell scripts
54 to test the output from <command>testparm</command>.</para>
58 <title>OPTIONS</title>
63 <listitem><para>Without this option, <command>testparm</command>
64 will prompt for a carriage return after printing the service
65 names and before dumping the service definitions.</para></listitem>
71 <listitem><para>Print usage message </para></listitem>
76 <term>-L servername</term>
77 <listitem><para>Sets the value of the %L macro to <replaceable>servername</replaceable>.
78 This is useful for testing include files specified with the
79 %L macro. </para></listitem>
84 <listitem><para>If this option is specified, testparm
85 will also output all options that were not used in
86 <filename>smb.conf</filename> and are thus set to
87 their defaults.</para></listitem>
91 <term>-t encoding</term>
93 Output data in specified encoding.
98 <term>configfilename</term>
99 <listitem><para>This is the name of the configuration file
100 to check. If this parameter is not present then the
101 default <filename>smb.conf</filename> file will be checked.
107 <term>hostname</term>
108 <listitem><para>If this parameter and the following are
109 specified, then <command>testparm</command> will examine the <parameter>hosts
110 allow</parameter> and <parameter>hosts deny</parameter>
111 parameters in the <filename>smb.conf</filename> file to
112 determine if the hostname with this IP address would be
113 allowed access to the <command>smbd</command> server. If
114 this parameter is supplied, the hostIP parameter must also
115 be supplied.</para></listitem>
121 <listitem><para>This is the IP address of the host specified
122 in the previous parameter. This address must be supplied
123 if the hostname parameter is supplied. </para></listitem>
133 <term><filename>smb.conf</filename></term>
134 <listitem><para>This is usually the name of the configuration
135 file used by <command>smbd</command>.
142 <title>DIAGNOSTICS</title>
144 <para>The program will issue a message saying whether the
145 configuration file loaded OK or not. This message may be preceded by
146 errors and warnings if the file did not load. If the file was
147 loaded OK, the program then dumps all known service details
153 <title>VERSION</title>
155 <para>This man page is correct for version 3.0 of
156 the Samba suite.</para>
160 <title>SEE ALSO</title>
161 <para><ulink url="smb.conf.5.html"><filename>smb.conf(5)</filename></ulink>,
162 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
167 <title>AUTHOR</title>
169 <para>The original Samba software and related utilities
170 were created by Andrew Tridgell. Samba is now developed
171 by the Samba Team as an Open Source project similar
172 to the way the Linux kernel is developed.</para>
174 <para>The original Samba man pages were written by Karl Auer.
175 The man page sources were converted to YODL format (another
176 excellent piece of Open Source software, available at
177 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
178 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
179 release by Jeremy Allison. The conversion to DocBook for
180 Samba 2.2 was done by Gerald Carter</para>