NSLU2-Linux
view · edit · print · history

SWAT web config tool

SWAT (the Samba Web Administration Tool) is a tool for administering the Samba networking server. SWAT used to be included in the samba package, but has been moved into a separate samba3-swat package, which has a dependency on the xinetd package.

Install SWAT with this ipkg command:

 
ipkg install samba3-swat

Edit your rc.xinetd diversion script to register SWAT with xinetd. The diversion script should be in your Unslung directory (/unslung).

Warning : If you already created a rc.xinetd diversion script, you should only add the part from 'if' to 'fi' and insert it before the 'return 1' in your orginal script. Deleting or editing the other content may result in disabled services, which for example could disable your telnet access.

If you add the following content, SWAT should work out of the box:

  
#!/bin/sh
# Diversion script: /unslung/rc.xinetd
# Customize for your own use, do not delete your original content!
#

if ( [ ! -f /etc/inetd.conf ] || !(grep swat /etc/inetd.conf -q) ) then
  echo "swat stream tcp nowait root /opt/sbin/swat swat" >>/etc/inetd.conf
fi

return 1
 

Restart xinetd by executing the xinetd init script:

  
/opt/etc/init.d/S10xinetd
 

Once that is done just point your browser to http://IP-address-of-your-slug:901, and enjoy. More info on Samba 3 (inclusing SWAT) can be found on the web at: http://us3.samba.org/samba/docs/man/ .

Full control off SWAT is only given if you logon as root. (To be exact, the full control depends on the SWAT user having write access to /opt/etc/samba/smb.conf, so you can grant non-root users full control by changing this file's owner or access permissions.)

If you log in as any other user, you will only be able to read documentation and change your user's own passwod. A normal user only get the buttons: Home, Status, View and Password. The root users also gets the buttons to manage shares.

view · edit · print · history · Last edited by Jim DeLaHunt.
Originally by Jim DeLaHunt.
Page last modified on December 28, 2009, at 05:57 AM