Start documenting undocumented parameters.
[Samba.git] / docs / manpages-3 / testparm.1.xml
blob917627d6323ef1066bde738c9b5406387d034a55
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">
5 <refmeta>
6         <refentrytitle>testparm</refentrytitle>
7         <manvolnum>1</manvolnum>
8 </refmeta>
11 <refnamediv>
12         <refname>testparm</refname>
13         <refpurpose>check an smb.conf configuration file for 
14         internal correctness</refpurpose>
15 </refnamediv>
17 <refsynopsisdiv>
18         <cmdsynopsis>
19                 <command>testparm</command>
20                 <arg choice="opt">-s</arg>
21                 <arg choice="opt">-h</arg>
22                 <arg choice="opt">-v</arg>
23                 <arg choice="opt">-L &lt;servername&gt;</arg>
24                 <arg choice="opt">-t &lt;encoding&gt;</arg>
25                 <arg choice="req">config filename</arg>
26                 <arg choice="opt">hostname hostIP</arg>
27         </cmdsynopsis>
28 </refsynopsisdiv>
30 <refsect1>
31         <title>DESCRIPTION</title>
33         <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
34         <manvolnum>7</manvolnum></citerefentry> suite.</para>
36         <para><command>testparm</command> is a very simple test program 
37         to check an <citerefentry><refentrytitle>smbd</refentrytitle>
38         <manvolnum>8</manvolnum></citerefentry> configuration file for 
39         internal correctness. If this program reports no problems, you 
40         can use the configuration file with confidence that <command>smbd
41         </command> will successfully load the configuration file.</para>
44         <para>Note that this is <emphasis>NOT</emphasis> a guarantee that 
45         the services specified in the configuration file will be 
46         available or will operate as expected. </para>
48         <para>If the optional host name and host IP address are 
49         specified on the command line, this test program will run through 
50         the service entries reporting whether the specified host
51         has access to each service. </para>
53         <para>If <command>testparm</command> finds an error in the <filename>
54         smb.conf</filename> file it returns an exit code of 1 to the calling 
55         program, else it returns an exit code of 0. This allows shell scripts 
56         to test the output from <command>testparm</command>.</para>
57 </refsect1>
59 <refsect1>
60         <title>OPTIONS</title>
62         <variablelist>
63                 <varlistentry>
64                 <term>-s</term>
65                 <listitem><para>Without this option, <command>testparm</command> 
66                 will prompt for a carriage return after printing the service 
67                 names and before dumping the service definitions.</para></listitem>
68                 </varlistentry>
70                 &stdarg.help;
71                 &stdarg.version;
72                 
73                 <varlistentry>
74                 <term>-L servername</term>
75                 <listitem><para>Sets the value of the %L macro to <replaceable>servername</replaceable>.
76                 This is useful for testing include files specified with the 
77                 %L macro. </para></listitem>
78                 </varlistentry>
80                 <varlistentry>
81                 <term>-v</term>
82                 <listitem><para>If this option is specified, testparm 
83                 will also output all options that were not used in <citerefentry>
84                 <refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
85                 </citerefentry> and are thus set to their defaults.</para></listitem>
86                 </varlistentry>
88                 <varlistentry>
89                 <term>-t encoding</term>
90                 <listitem><para>
91                 Output data in specified encoding.
92                 </para></listitem>
93                 </varlistentry>
95                 <varlistentry>
96                 <term>--parameter-name parametername</term>
97                 <listitem><para>
98                 Dumps the named parameter.  If no section-name is set the view
99                 is limited by default to the global section.
101                 It is also possible to dump a parametrical option.  Therfore
102                 the option has to be separated by a colon from the
103                 parametername.
104                 </para></listitem>
105                 </varlistentry>
107                 <varlistentry>
108                 <term>--section-name sectionname</term>
109                 <listitem><para>
110                 Dumps the named section.
111                 </para></listitem>
112                 </varlistentry>
114                 <varlistentry>
115                 <term>configfilename</term>
116                 <listitem><para>This is the name of the configuration file 
117                 to check. If this parameter is not present then the 
118                 default <citerefentry><refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
119                 </citerefentry> file will be checked.   
120                 </para></listitem>
121                 </varlistentry>
124                 <varlistentry>
125                 <term>hostname</term>
126                 <listitem><para>If this parameter and the following are 
127                 specified, then <command>testparm</command> will examine the <parameter>hosts
128                 allow</parameter> and <parameter>hosts deny</parameter> 
129                 parameters in the <citerefentry>
130                 <refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
131                 </citerefentry> file to 
132                 determine if the hostname with this IP address would be
133                 allowed access to the <command>smbd</command> server.  If 
134                 this parameter is supplied, the hostIP parameter must also
135                 be supplied.</para></listitem>
136                 </varlistentry>
139                 <varlistentry>
140                 <term>hostIP</term>
141                 <listitem><para>This is the IP address of the host specified 
142                 in the previous parameter.  This address must be supplied 
143                 if the hostname parameter is supplied. </para></listitem>
144                 </varlistentry>
145         </variablelist>
146 </refsect1>
148 <refsect1>
149         <title>FILES</title>
151         <variablelist>
152                 <varlistentry>
153                 <term><citerefentry><refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
154                 </citerefentry></term>
155                 <listitem><para>This is usually the name of the configuration 
156                 file used by <citerefentry><refentrytitle>smbd</refentrytitle><manvolnum>8</manvolnum>
157                 </citerefentry>. 
158                 </para></listitem>
159                 </varlistentry>
160         </variablelist>
161 </refsect1>
163 <refsect1>
164         <title>DIAGNOSTICS</title>
166         <para>The program will issue a message saying whether the 
167         configuration file loaded OK or not. This message may be preceded by 
168         errors and warnings if the file did not load. If the file was 
169         loaded OK, the program then dumps all known service details 
170         to stdout. </para>
171 </refsect1>
174 <refsect1>
175         <title>VERSION</title>
177         <para>This man page is correct for version 3.0 of 
178         the Samba suite.</para>
179 </refsect1>
181 <refsect1>
182         <title>SEE ALSO</title>
183         <para><citerefentry>
184                 <refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum>
185                 </citerefentry>, <citerefentry>
186                 <refentrytitle>smbd</refentrytitle><manvolnum>8</manvolnum>
187                 </citerefentry></para>
188 </refsect1>
190 <refsect1>
191         <title>AUTHOR</title>
192         
193         <para>The original Samba software and related utilities 
194         were created by Andrew Tridgell. Samba is now developed
195         by the Samba Team as an Open Source project similar 
196         to the way the Linux kernel is developed.</para>
197         
198         <para>The original Samba man pages were written by Karl Auer. 
199         The man page sources were converted to YODL format (another 
200         excellent piece of Open Source software, available at <ulink noescape="1" url="ftp://ftp.icce.rug.nl/pub/unix/">
201         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
202         release by Jeremy Allison.  The conversion to DocBook for 
203         Samba 2.2 was done by Gerald Carter. The conversion to DocBook XML 4.2
204         for Samba 3.0 was done by Alexander Bokovoy.</para>
205 </refsect1>
207 </refentry>