Enabling SWAT
The
Samba
Web Administration Tool (SWAT) runs as a daemon under
inetd or xinetd and
provides a forms-based editor in your web browser for creating and
modifying Samba’s
configuration file. For SWAT to work, entries must be added for it in
the /etc/services and
/etc/inetd.conf (or
/etc/xinetd.d/swat) configuration files. To add
the entries, follow these two steps:
Check your
/etc/servicesfile, and if it does not contain the following line, add it to the end of the file:swat 901/tcp
Now for
inetdorxinetd.These are “Internet super daemons” that handle starting daemons on demand, instead of letting them sit around in memory consuming system resources. Most systems useinetd,butxinetdis also used in some versions of Unix, notably the Red Hat Linux (Versions 7 and newer) that we use in our examples. You can use the ps command to see which of the two your system is running.
For inetd, add a line to the
/etc/
inetd.conf file.
(Check your inetd.conf manual page to see the
exact format of the inetd.conf file if it
differs from the following example.) Don’t forget to
change the path to the SWAT binary if you installed it in a different
location from the default /usr/local/samba:
swat stream tcp nowait root /usr/local/samba/bin/swat swat
Then force inetd to reread its configuration
file by sending it a SIGHUP (hangup) signal:
# /bin/kill -HUP -a inetdNotice that we are using a version of the kill command that supports the -a option, so as to allow us to specify the process ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access