1SWAT(8)                                                                SWAT(8)
2
3
4

NAME

6       swat - Samba Web Administration Tool
7

SYNOPSIS

9       swat [-s <smb config file>] [-a] [-P]
10

DESCRIPTION

12       This tool is part of the samba(7) suite.
13
14       swat  allows a Samba administrator to configure the complex smb.conf(5)
15       file via a Web browser. In addition, a swat configuration page has help
16       links  to all the configurable options in the smb.conf file allowing an
17       administrator to easily look up the effects of any change.
18
19       swat is run from inetd
20

OPTIONS

22       -s smb configuration file
23          The default configuration file path is determined at  compile  time.
24          The  file  specified  contains the configuration details required by
25          the smbd(8) server. This is the file  that  swat  will  modify.  The
26          information  in  this file includes server-specific information such
27          as what printcap file to use, as well as  descriptions  of  all  the
28          services that the server is to provide. See smb.conf for more infor‐
29          mation.
30
31       -a
32          This option disables authentication and places swat in demo mode. In
33          that mode anyone will be able to modify the smb.conf file.
34
35          WARNING: Do NOT enable this option on a production server.
36
37       -P
38          This  option  restricts  read-only  users to the password management
39          page.  swat can then be used to change user passwords without  users
40          seeing the "View" and "Status" menu buttons.
41
42       -V
43          Prints the program version number.
44
45       -s <configuration file>
46          The  file  specified  contains the configuration details required by
47          the server. The information in this  file  includes  server-specific
48          information  such  as what printcap file to use, as well as descrip‐
49          tions of all the  services  that  the  server  is  to  provide.  See
50          smb.conf  for  more information. The default configuration file name
51          is determined at compile time.
52
53       -d|--debuglevel=level
54          level is an integer from 0 to 10. The default value if this  parame‐
55          ter is not specified is zero.
56
57          The  higher  this  value,  the more detail will be logged to the log
58          files about the activities of the server. At level 0, only  critical
59          errors  and serious warnings will be logged. Level 1 is a reasonable
60          level for day-to-day running - it generates a small amount of infor‐
61          mation about operations carried out.
62
63          Levels  above  1 will generate considerable amounts of log data, and
64          should only be used when investigating a problem. Levels above 3 are
65          designed for use only by developers and generate HUGE amounts of log
66          data, most of which is extremely cryptic.
67
68          Note that specifying this parameter here will override the
69
70          parameter in the smb.conf file.
71
72       -l|--logfile=logdirectory
73          Base directory name for log/debug files. The  extension  ".progname"
74          will  be  appended  (e.g.  log.smbclient, log.smbd, etc...). The log
75          file is never removed by the client.
76
77       -h|--help
78          Print a summary of command line options.
79

INSTALLATION

81       Swat is included as binary package with most distributions. The package
82       manager  in this case takes care of the installation and configuration.
83       This section is only for those who have compiled swat from scratch.
84
85       After you compile SWAT you need to run make install to install the swat
86       binary  and  the various help files and images. A default install would
87       put these in:
88
89       ·  /usr/local/samba/sbin/swat
90
91       ·  /usr/local/samba/swat/images/*
92
93       ·  /usr/local/samba/swat/help/*
94
95   Inetd Installation
96       You need to edit your /etc/inetd.conf and /etc/services to enable  SWAT
97       to be launched via inetd.
98
99       In /etc/services you need to add a line like this:
100
101       swat 901/tcp
102
103       Note  for  NIS/YP and LDAP users - you may need to rebuild the NIS ser‐
104       vice maps rather than alter your local
105        /etc/services file.
106
107       the choice of port number isn't really important except that it  should
108       be  less  than  1024  and not currently used (using a number above 1024
109       presents an obscure  security  hole  depending  on  the  implementation
110       details of your inetd daemon).
111
112       In /etc/inetd.conf you should add a line like this:
113
114       swat stream tcp nowait.400 root /usr/local/samba/sbin/swat swat
115
116       Once you have edited /etc/services and /etc/inetd.conf you need to send
117       a HUP signal to inetd. To do this use kill -1  PID  where  PID  is  the
118       process ID of the inetd daemon.
119

LAUNCHING

121       To  launch  SWAT  just  run  your  favorite web browser and point it at
122       "http://localhost:901/".
123
124       Note that you can attach to SWAT from any IP connected machine but con‐
125       necting  from  a remote machine leaves your connection open to password
126       sniffing as passwords will be sent in the clear over the wire.
127

FILES

129       /etc/inetd.conf
130          This file must contain suitable startup information  for  the  meta-
131          daemon.
132
133       /etc/services
134          This  file  must  contain  a mapping of service name (e.g., swat) to
135          service port (e.g., 901) and protocol type (e.g., tcp).
136
137       /usr/local/samba/lib/smb.conf
138          This is the default location of the smb.conf(5) server configuration
139          file  that swat edits. Other common places that systems install this
140          file are
141           /usr/samba/lib/smb.conf and /etc/smb.conf . This file describes all
142          the services the server is to make available to clients.
143

WARNINGS

145       swat  will rewrite your smb.conf(5) file. It will rearrange the entries
146       and delete all comments, include= and copy=  options.  If  you  have  a
147       carefully crafted
148        smb.conf then back it up or don't use swat!
149

VERSION

151       This man page is correct for version 3.0 of the Samba suite.
152

SEE ALSO

154       inetd(5), smbd(8), smb.conf(5)
155

AUTHOR

157       The  original  Samba  software  and  related  utilities were created by
158       Andrew Tridgell. Samba is now developed by the Samba Team  as  an  Open
159       Source project similar to the way the Linux kernel is developed.
160
161       The  original  Samba  man pages were written by Karl Auer. The man page
162       sources were converted to YODL format (another excellent piece of  Open
163       Source  software,  available  at  ftp://ftp.icce.rug.nl/pub/unix/)  and
164       updated for the Samba 2.0 release by Jeremy Allison. The conversion  to
165       DocBook for Samba 2.2 was done by Gerald Carter. The conversion to Doc‐
166       Book XML 4.2 for Samba 3.0 was done by Alexander Bokovoy.
167
168
169
170
171                                                                       SWAT(8)
Impressum