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