mega-merge from 2.2
[Samba/gbeck.git] / docs / docbook / manpages / testparm.1.sgml
blob320e39e6f5827547b4d3e62099d48032388b642c
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="testparm">
4 <refmeta>
5 <refentrytitle>testparm</refentrytitle>
6 <manvolnum>1</manvolnum>
7 </refmeta>
10 <refnamediv>
11 <refname>testparm</refname>
12 <refpurpose>check an smb.conf configuration file for
13 internal correctness</refpurpose>
14 </refnamediv>
16 <refsynopsisdiv>
17 <cmdsynopsis>
18 <command>testparm</command>
19 <arg choice="opt">-s</arg>
20 <arg choice="opt">-h</arg>
21 <arg choice="opt">-L &lt;servername&gt;</arg>
22 <arg choice="req">config filename</arg>
23 <arg choice="opt">hostname hostIP</arg>
24 </cmdsynopsis>
25 </refsynopsisdiv>
27 <refsect1>
28 <title>DESCRIPTION</title>
30 <para>This tool is part of the <ulink url="samba.7.html">
31 Samba</ulink> suite.</para>
33 <para><command>testparm</command> is a very simple test program
34 to check an <command>smbd</command> configuration file for
35 internal correctness. If this program reports no problems, you
36 can use the configuration file with confidence that <command>smbd
37 </command> will successfully load the configuration file.</para>
40 <para>Note that this is <emphasis>NOT</emphasis> a guarantee that
41 the services specified in the configuration file will be
42 available or will operate as expected. </para>
44 <para>If the optional host name and host IP address are
45 specified on the command line, this test program will run through
46 the service entries reporting whether the specified host
47 has access to each service. </para>
49 <para>If <command>testparm</command> finds an error in the <filename>
50 smb.conf</filename> file it returns an exit code of 1 to the calling
51 program, else it returns an exit code of 0. This allows shell scripts
52 to test the output from <command>testparm</command>.</para>
53 </refsect1>
55 <refsect1>
56 <title>OPTIONS</title>
58 <variablelist>
59 <varlistentry>
60 <term>-s</term>
61 <listitem><para>Without this option, <command>testparm</command>
62 will prompt for a carriage return after printing the service
63 names and before dumping the service definitions.</para></listitem>
64 </varlistentry>
67 <varlistentry>
68 <term>-h</term>
69 <listitem><para>Print usage message </para></listitem>
70 </varlistentry>
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>
81 <varlistentry>
82 <term>configfilename</term>
83 <listitem><para>This is the name of the configuration file
84 to check. If this parameter is not present then the
85 default <filename>smb.conf</filename> file will be checked.
86 </para></listitem>
87 </varlistentry>
90 <varlistentry>
91 <term>hostname</term>
92 <listitem><para>If this parameter and the following are
93 specified, then <command>testparm</command> will examine the <parameter>hosts
94 allow</parameter> and <parameter>hosts deny</parameter>
95 parameters in the <filename>smb.conf</filename> file to
96 determine if the hostname with this IP address would be
97 allowed access to the <command>smbd</command> server. If
98 this parameter is supplied, the hostIP parameter must also
99 be supplied.</para></listitem>
100 </varlistentry>
103 <varlistentry>
104 <term>hostIP</term>
105 <listitem><para>This is the IP address of the host specified
106 in the previous parameter. This address must be supplied
107 if the hostname parameter is supplied. </para></listitem>
108 </varlistentry>
109 </variablelist>
110 </refsect1>
112 <refsect1>
113 <title>FILES</title>
115 <variablelist>
116 <varlistentry>
117 <term><filename>smb.conf</filename></term>
118 <listitem><para>This is usually the name of the configuration
119 file used by <command>smbd</command>.
120 </para></listitem>
121 </varlistentry>
122 </variablelist>
123 </refsect1>
125 <refsect1>
126 <title>DIAGNOSTICS</title>
128 <para>The program will issue a message saying whether the
129 configuration file loaded OK or not. This message may be preceded by
130 errors and warnings if the file did not load. If the file was
131 loaded OK, the program then dumps all known service details
132 to stdout. </para>
133 </refsect1>
136 <refsect1>
137 <title>VERSION</title>
139 <para>This man page is correct for version 2.2 of
140 the Samba suite.</para>
141 </refsect1>
143 <refsect1>
144 <title>SEE ALSO</title>
145 <para><ulink url="smb.conf.5.html"><filename>smb.conf(5)</filename></ulink>,
146 <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>
147 </para>
148 </refsect1>
150 <refsect1>
151 <title>AUTHOR</title>
153 <para>The original Samba software and related utilities
154 were created by Andrew Tridgell. Samba is now developed
155 by the Samba Team as an Open Source project similar
156 to the way the Linux kernel is developed.</para>
158 <para>The original Samba man pages were written by Karl Auer.
159 The man page sources were converted to YODL format (another
160 excellent piece of Open Source software, available at
161 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
162 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
163 release by Jeremy Allison. The conversion to DocBook for
164 Samba 2.2 was done by Gerald Carter</para>
165 </refsect1>
167 </refentry>