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