This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[kai/samba.git] / docs / docbook / manpages / swat.8.sgml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="swat">
3
4 <refmeta>
5         <refentrytitle>swat</refentrytitle>
6         <manvolnum>8</manvolnum>
7 </refmeta>
8
9
10 <refnamediv>
11         <refname>swat</refname>
12         <refpurpose>Samba Web Administration Tool</refpurpose>
13 </refnamediv>
14
15 <refsynopsisdiv>
16         <cmdsynopsis>
17                 <command>swat</command>
18                 <arg choice="opt">-s &lt;smb config file&gt;</arg>
19                 <arg choice="opt">-a</arg>
20         </cmdsynopsis>
21 </refsynopsisdiv>
22
23 <refsect1>
24         <title>DESCRIPTION</title>
25
26         <para>This tool is part of the <ulink url="samba.7.html">
27         Samba</ulink> suite.</para>
28
29
30         <para><command>swat</command> allows a Samba administrator to 
31         configure the complex <ulink url="smb.conf.5.html"><filename>
32         smb.conf(5)</filename></ulink> file via a Web browser. In addition, 
33         a <command>swat</command> configuration page has help links 
34         to all the configurable options in the <filename>smb.conf</filename> file allowing an 
35         administrator to easily look up the effects of any change. </para>
36
37         <para><command>swat</command> is run from <command>inetd</command> </para>
38 </refsect1>
39
40
41 <refsect1>
42         <title>OPTIONS</title>
43
44         <variablelist>
45                 <varlistentry>
46                 <term>-s smb configuration file</term>
47                 <listitem><para>The default configuration file path is 
48                 determined at compile time.  The file specified contains 
49                 the configuration details required by the <command>smbd
50                 </command> server. This is the file that <command>swat</command> will modify. 
51                 The information in this file includes server-specific 
52                 information such as what printcap file to use, as well as 
53                 descriptions of all the services that the server is to provide.
54                 See <filename>smb.conf</filename> for more information. 
55                 </para></listitem>
56                 </varlistentry>
57
58
59                 <varlistentry>
60                 <term>-a</term>
61                 <listitem><para>This option disables authentication and puts 
62                 <command>swat</command> in demo mode. In that mode anyone will be able to modify 
63                 the <filename>smb.conf</filename> file. </para>
64                 
65                 <para><emphasis>Do NOT enable this option on a production 
66                 server. </emphasis></para></listitem>
67                 </varlistentry>
68         </variablelist>
69
70 </refsect1>
71
72 <refsect1>
73
74         <title>INSTALLATION</title>
75
76         <para>After you compile SWAT you need to run <command>make install
77         </command> to install the <command>swat</command> binary
78         and the various help files and images. A default install would put 
79         these in: </para>
80         
81         <itemizedlist>
82                 <listitem><para>/usr/local/samba/bin/swat</para></listitem>
83                 <listitem><para>/usr/local/samba/swat/images/*</para></listitem>
84                 <listitem><para>/usr/local/samba/swat/help/*</para></listitem>
85         </itemizedlist>
86
87         <refsect2> 
88                 <title>Inetd Installation</title>
89
90                 <para>You need to edit your <filename>/etc/inetd.conf
91                 </filename> and <filename>/etc/services</filename>
92                 to enable SWAT to be launched via <command>inetd</command>.</para>
93
94                 <para>In <filename>/etc/services</filename> you need to 
95                 add a line like this: </para>
96
97                 <para><command>swat            901/tcp</command></para>
98
99                 <para>Note for NIS/YP users - you may need to rebuild the 
100                 NIS service maps rather than alter your local <filename>
101                 /etc/services</filename> file. </para>
102
103                 <para>the choice of port number isn't really important 
104                 except that it should be less than 1024 and not currently 
105                 used (using a number above 1024 presents an obscure security 
106                 hole depending on the implementation details of your 
107                 <command>inetd</command> daemon). </para>
108
109                 <para>In <filename>/etc/inetd.conf</filename> you should 
110                 add a line like this: </para>
111
112                 <para><command>swat    stream  tcp     nowait.400  root
113                 /usr/local/samba/bin/swat swat</command></para>
114         
115                 <para>One you have edited <filename>/etc/services</filename> 
116                 and <filename>/etc/inetd.conf</filename> you need to send a 
117                 HUP signal to inetd. To do this use <command>kill -1 PID
118                 </command> where PID is the process ID of the inetd daemon. </para>
119
120         </refsect2>
121
122
123         <refsect2>
124                 <title>Launching</title>
125
126                 <para>To launch SWAT just run your favorite web browser and 
127                 point it at "http://localhost:901/".</para>
128
129                 <para>Note that you can attach to SWAT from any IP connected 
130                 machine but connecting from a remote machine leaves your 
131                 connection open to password sniffing as passwords will be sent 
132                 in the clear over the wire. </para>
133         </refsect2>
134 </refsect1>
135
136 <refsect1>
137         <title>FILES</title>
138         
139         <variablelist>
140                 <varlistentry>
141                 <term><filename>/etc/inetd.conf</filename></term>
142                 <listitem><para>This file must contain suitable startup 
143                 information for the meta-daemon.</para></listitem>
144                 </varlistentry>
145
146                 <varlistentry>
147                 <term><filename>/etc/services</filename></term>
148                 <listitem><para>This file must contain a mapping of service name 
149                 (e.g., swat) to service port (e.g., 901) and protocol type 
150                 (e.g., tcp).  </para></listitem>
151                 </varlistentry>
152
153                 <varlistentry>
154                 <term><filename>/usr/local/samba/lib/smb.conf</filename></term>
155                 <listitem><para>This is the default location of the <filename>smb.conf(5)
156                 </filename> server configuration file that swat edits. Other 
157                 common places that systems install this file are <filename>
158                 /usr/samba/lib/smb.conf</filename> and <filename>/etc/smb.conf
159                 </filename>.  This file describes all the services the server 
160                 is to make available to clients. </para></listitem>
161                 </varlistentry>
162         </variablelist>
163 </refsect1>
164
165
166 <refsect1>
167         <title>WARNINGS</title>
168
169         <para><command>swat</command> will rewrite your <filename>smb.conf
170         </filename> file. It will rearrange the entries and delete all 
171         comments, <parameter>include=</parameter> and <parameter>copy="
172         </parameter> options. If you have a carefully crafted <filename>
173         smb.conf</filename> then back it up or don't use swat! </para>
174 </refsect1>
175
176
177 <refsect1>
178         <title>VERSION</title>
179
180         <para>This man page is correct for version 2.2 of 
181         the Samba suite.</para>
182 </refsect1>
183
184 <refsect1>
185         <title>SEE ALSO</title>
186         <para><command>inetd(5)</command>,
187         <ulink url="smbd.8.html"><command>smbd(8)</command></ulink>, 
188         <ulink url="smb.conf.5.html">smb.conf(5)</ulink>
189         </para>
190 </refsect1>
191
192 <refsect1>
193         <title>AUTHOR</title>
194         
195         <para>The original Samba software and related utilities 
196         were created by Andrew Tridgell. Samba is now developed
197         by the Samba Team as an Open Source project similar 
198         to the way the Linux kernel is developed.</para>
199         
200         <para>The original Samba man pages were written by Karl Auer. 
201         The man page sources were converted to YODL format (another 
202         excellent piece of Open Source software, available at
203         <ulink 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</para>
207 </refsect1>
208
209 </refentry>