Human Readable  

 

     
   
     

A Slackware Desktop Enhancement Guide

Enabling the Samba Web Administration Tool (SWAT)

© Copyright Darrell Anderson.

A common exercise for many people using Windows and GNU/Linux computers in the same network is to install and configure Samba. The KDE Control Center provides a nice interface for Samba, but the Samba maintainers provide their own tool as well. Users access this tool using a web browser. This web based tool is called the Samba Web Administration Tool or SWAT. From the same box that Samba is installed the command to browse the SWAT is http://localhost:901. From a different box, replace localhost with the box’s network name: http://tweetybird:901, or http://tweetybird@mydomain:901.

Unfortunately, many people try exactly that but they cannot connect to the SWAT. The reason is simple: they need to enable communications to port 901 on that box. The key to enabling port 901 is contained in the /etc/inetd.conf configuration file.

With a text editor open the inetd.conf file and search for two lines that look like this:

#Samba Web Administration Tool:
#swat  stream  tcp  nowait.400  root  /usr/sbin/swat  swat

Uncomment the second line by deleting the hash mark:

#Samba Web Administration Tool:
swat  stream  tcp  nowait.400  root  /usr/sbin/swat  swat

Save and close the inetd.conf file. Restart the inetd service or reboot the box.

Caveat: if starting Samba as a service with the /etc/rc.d/rc.samba script, do not in inetd.conf uncomment the lines that look like this:

#netbios-ssn  stream tcp  nowait root  /usr/sbin/smbd  smbd
#netbios-ns  dgram  udp  wait  root  /usr/sbin/nmbd  nmbd

Samba will not work correctly when run as a service and with the inetd service providing an additional wrapper to Samba.

Finis.

Table of Contents