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