Enable the SWAT Samba config tool in 10.2

Sep 06, '02 08:37:50AM

Contributed by: BraindeadMac

I was interested in running Samba's SWAT tool to configure Samba on my Jaguar system. This allows you to view and change the configuration of your Samba sharing in any web browser. You can run SWAT from xinetd or inetd; I chose to use xinetd. Here's how I did it...

Steps to take

  1. As the root user, create a file in /etc/xinetd.d named swat:
    sudo vi /etc/xinetd.d/swat
  2. Paste these contents:
    service swat
    {
    port = 901
    socket_type = stream
    wait = no
    only_from = localhost
    groups = yes
    user = root
    server = /usr/sbin/swat
    log_on_failure += USERID
    disable = No
    }
  3. Edit (as root) /etc/services to include:
    swat       901/tcp
  4. Restart the xinetd daemon with this command:
    sudo kill -HUP `cat /var/run/xinetd.pid`
    Sometimes xinetd doesn't restart here; if a ps -ax doesn't show xinetd, then use this command to restart xinetd
    sudo xinetd -pidfile /var/run/xinetd.pid
Now you should be able to login to SWAT from a browser, using the url http:/localhost:901. To get full administrative access, you will need to login as "root" (without the quotes) the first time.

Comments (26)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2002090605375018