1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
5 <refentrytitle>swat</refentrytitle>
6 <manvolnum>8</manvolnum>
11 <refname>swat</refname>
12 <refpurpose>Samba Web Administration Tool</refpurpose>
17 <command>swat</command>
18 <arg choice="opt">-s <smb config file></arg>
19 <arg choice="opt">-a</arg>
24 <title>DESCRIPTION</title>
26 <para>This tool is part of the <ulink url="samba.7.html">
27 Samba</ulink> suite.</para>
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>
37 <para><command>swat</command> is run from <command>inetd</command> </para>
42 <title>OPTIONS</title>
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.
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>
65 <para><emphasis>Do NOT enable this option on a production
66 server. </emphasis></para></listitem>
74 <title>INSTALLATION</title>
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
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>
88 <title>Inetd Installation</title>
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>
94 <para>In <filename>/etc/services</filename> you need to
95 add a line like this: </para>
97 <para><command>swat 901/tcp</command></para>
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>
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>
109 <para>In <filename>/etc/inetd.conf</filename> you should
110 add a line like this: </para>
112 <para><command>swat stream tcp nowait.400 root
113 /usr/local/samba/bin/swat swat</command></para>
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>
124 <title>Launching</title>
126 <para>To launch SWAT just run your favorite web browser and
127 point it at "http://localhost:901/".</para>
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>
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>
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>
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>
167 <title>WARNINGS</title>
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>
178 <title>VERSION</title>
180 <para>This man page is correct for version 2.2 of
181 the Samba suite.</para>
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>
193 <title>AUTHOR</title>
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>
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>