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="req">config filename</arg>
24 <arg choice="opt">hostname hostIP</arg>
29 <title>DESCRIPTION</title>
31 <para>This tool is part of the <ulink url="samba.7.html">
32 Samba</ulink> suite.</para>
34 <para><command>testparm</command> is a very simple test program
35 to check an <command>smbd</command> configuration file for
36 internal correctness. If this program reports no problems, you
37 can use the configuration file with confidence that <command>smbd
38 </command> will successfully load the configuration file.</para>
41 <para>Note that this is <emphasis>NOT</emphasis> a guarantee that
42 the services specified in the configuration file will be
43 available or will operate as expected. </para>
45 <para>If the optional host name and host IP address are
46 specified on the command line, this test program will run through
47 the service entries reporting whether the specified host
48 has access to each service. </para>
50 <para>If <command>testparm</command> finds an error in the <filename>
51 smb.conf</filename> file it returns an exit code of 1 to the calling
52 program, else it returns an exit code of 0. This allows shell scripts
53 to test the output from <command>testparm</command>.</para>
57 <title>OPTIONS</title>
62 <listitem><para>Without this option, <command>testparm</command>
63 will prompt for a carriage return after printing the service
64 names and before dumping the service definitions.</para></listitem>
70 <listitem><para>Print usage message </para></listitem>
75 <term>-L servername</term>
76 <listitem><para>Sets the value of the %L macro to <replaceable>servername</replaceable>.
77 This is useful for testing include files specified with the
78 %L macro. </para></listitem>
83 <listitem><para>If this option is specified, testparm
84 will also output all options that were not used in
85 <filename>smb.conf</filename> and are thus set to
86 their defaults.</para></listitem>
90 <term>configfilename</term>
91 <listitem><para>This is the name of the configuration file
92 to check. If this parameter is not present then the
93 default <filename>smb.conf</filename> file will be checked.
100 <listitem><para>If this parameter and the following are
101 specified, then <command>testparm</command> will examine the <parameter>hosts
102 allow</parameter> and <parameter>hosts deny</parameter>
103 parameters in the <filename>smb.conf</filename> file to
104 determine if the hostname with this IP address would be
105 allowed access to the <command>smbd</command> server. If
106 this parameter is supplied, the hostIP parameter must also
107 be supplied.</para></listitem>
113 <listitem><para>This is the IP address of the host specified
114 in the previous parameter. This address must be supplied
115 if the hostname parameter is supplied. </para></listitem>
125 <term><filename>smb.conf</filename></term>
126 <listitem><para>This is usually the name of the configuration
127 file used by <command>smbd</command>.
134 <title>DIAGNOSTICS</title>
136 <para>The program will issue a message saying whether the
137 configuration file loaded OK or not. This message may be preceded by
138 errors and warnings if the file did not load. If the file was
139 loaded OK, the program then dumps all known service details
145 <title>VERSION</title>
147 <para>This man page is correct for version 2.2 of
148 the Samba suite.</para>
152 <title>SEE ALSO</title>
153 <para><ulink url="smb.conf.5.html"><filename>smb.conf(5)</filename></ulink>,
154 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
159 <title>AUTHOR</title>
161 <para>The original Samba software and related utilities
162 were created by Andrew Tridgell. Samba is now developed
163 by the Samba Team as an Open Source project similar
164 to the way the Linux kernel is developed.</para>
166 <para>The original Samba man pages were written by Karl Auer.
167 The man page sources were converted to YODL format (another
168 excellent piece of Open Source software, available at
169 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
170 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
171 release by Jeremy Allison. The conversion to DocBook for
172 Samba 2.2 was done by Gerald Carter</para>