NSLU2-Linux
view · edit · print · history

Optware.SWAT History

Hide minor edits - Show changes to markup

February 24, 2011, at 09:58 AM by OddballHero -- SWAT for PlugComputers.
Changed lines 50-51 from:

Addendum for Plug Users:

to:

Addendum for Plug Users:

Changed lines 54-55 from:

SWAT (the Samba Web Administration Tool) is installed by default with the samba2 package.

to:

SWAT (the Samba Web Administration Tool) is installed by default with the samba2 package.

February 23, 2011, at 09:53 PM by OddballHero -- Swat addendum for plugs
Changed lines 56-57 from:

1. First install samba2.

to:

1. First install samba2.

February 23, 2011, at 09:50 PM by OddballHero -- Swat addendum for plugs
Changed lines 64-66 from:

4. Edit with vi or nano /opt/etc/xinetd.conf.

    Edit the only_from line to contain your subnet so you can access the service (change 192.168.0.0/24 to your local subnet)
to:

4. Edit with vi or nano /opt/etc/xinetd.conf. Edit the only_from line to contain your subnet so you can access the service (change 192.168.0.0/24 to your local subnet)

Changed lines 93-95 from:

9. Use your browser by accessing this address "http://IP-address-of-your-PlugPro:901"

10. If you want to always have swat accessible or are using xinetd for any other communication utility the place S10xinetd in your rcS or mount_optextX file. If you are just performing a one-time configuration then just manually run S10xinetd when needed and nobody else will have access to swat but you.

to:

9. Use your browser by accessing this address "http://IP-address-of-your-PlugPro:901"

10. If you want to always have swat accessible or are using xinetd for any other communication utility the place S10xinetd in your rcS or mount_optextX file. If you are just performing a one-time configuration then just manually run S10xinetd when needed and nobody else will have access to swat but you. You can make your rootfs read only again:

    Type "mount -o ro,remount /"
February 23, 2011, at 09:45 PM by OddballHero -- Swat addendum for plugs
Changed lines 50-51 from:

Addendum for Plug Users:

to:

Addendum for Plug Users:

Changed lines 56-58 from:
 1.  First install samba2.

 2.  Create a root password for Samba because you will need this to log in to the SWAT interface:
to:

1. First install samba2.

2. Create a root password for Samba because you will need this to log in to the SWAT interface:

Changed line 61 from:
 3.  Xinetd is needed to initialize the swat service after samba2 is installed so install xinetd.
to:

3. Xinetd is needed to initialize the swat service after samba2 is installed so install xinetd.

Changed lines 64-69 from:
 4.  Edit with vi or nano /opt/etc/xinetd.conf.
     Edit the only_from line to contain your subnet so you can access the service (change 192.168.0.0/24 to your local subnet)

 5.  Edit /opt/etc/xinetd.d/swat and insert the line "protocol = tcp" below the "socket_type = stream" line and edit the only_from line to match the xinetd.conf file.

 Here is what the resulting "swat" file approximately looks like:
to:

4. Edit with vi or nano /opt/etc/xinetd.conf.

    Edit the only_from line to contain your subnet so you can access the service (change 192.168.0.0/24 to your local subnet)

5. Edit /opt/etc/xinetd.d/swat and insert the line "protocol = tcp" below the "socket_type = stream" line and edit the only_from line to match the xinetd.conf file.

Here is what the resulting "swat" file approximately looks like:

Changed line 84 from:
 6.  Now we need to install the protocols and services file from http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ but first we need access to the root file system since it is read only:
to:

6. Now we need to install the protocols and services file from http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ but first we need access to the root file system since it is read only:

Changed line 87 from:
 7.  Change to /etc directory with "cd /etc" and download the 2 files with:
to:

7. Change to /etc directory with "cd /etc" and download the 2 files with:

Changed line 91 from:
 8.  Now Start xinetd (notice you do not have to append start):
to:

8. Now Start xinetd (notice you do not have to append start):

Changed lines 94-96 from:
 9.  Use your browser by accessing this address "http://IP-address-of-your-PlugPro:901"

 10. If you want to always have swat accessible or are using xinetd for any other communication utility the place S10xinetd in your rcS or mount_optextX file.  If you are just performing a one-time configuration then just manually run S10xinetd when needed and nobody else will have access to swat but you.
to:

9. Use your browser by accessing this address "http://IP-address-of-your-PlugPro:901"

10. If you want to always have swat accessible or are using xinetd for any other communication utility the place S10xinetd in your rcS or mount_optextX file. If you are just performing a one-time configuration then just manually run S10xinetd when needed and nobody else will have access to swat but you.

February 23, 2011, at 09:42 PM by OddballHero -- Swat addendum for plugs
Changed lines 50-55 from:

Addendum for Plug Users://

Quickie xinetd swat configuration://

SWAT (the Samba Web Administration Tool) is installed by default with the samba2 package.//

to:

Addendum for Plug Users:
Quickie xinetd swat configuration:
SWAT (the Samba Web Administration Tool) is installed by default with the samba2 package.

February 23, 2011, at 09:41 PM by OddballHero -- Swat addendum for plugs
Added lines 49-96:

Addendum for Plug Users://

Quickie xinetd swat configuration://

SWAT (the Samba Web Administration Tool) is installed by default with the samba2 package.//

 1.  First install samba2.

 2.  Create a root password for Samba because you will need this to log in to the SWAT interface:
    Type "smbpasswd -a root"

 3.  Xinetd is needed to initialize the swat service after samba2 is installed so install xinetd.
    Type "ipkg install xinetd"

 4.  Edit with vi or nano /opt/etc/xinetd.conf.
     Edit the only_from line to contain your subnet so you can access the service (change 192.168.0.0/24 to your local subnet)

 5.  Edit /opt/etc/xinetd.d/swat and insert the line "protocol = tcp" below the "socket_type = stream" line and edit the only_from line to match the xinetd.conf file.

 Here is what the resulting "swat" file approximately looks like:
     service swat
    {
            port    = 901
            socket_type     = stream
            protocol        = tcp
            wait    = no
            only_from = localhost 192.168.xxx.xxx/24
            user    = root
            server  = /opt/sbin/swat
            log_on_failure  += USERID
            disable =  No
    }


 6.  Now we need to install the protocols and services file from http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/ but first we need access to the root file system since it is read only:
    Type "mount -o rw,remount /"

 7.  Change to /etc directory with "cd /etc" and download the 2 files with:
    "wget http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/services"
    "wget http://tech.groups.yahoo.com/group/nslu2-general/files/Plug%20Files/protocols"

 8.  Now Start xinetd (notice you do not have to append start):
    Type "/opt/etc/init.d/S10xinetd"

 9.  Use your browser by accessing this address "http://IP-address-of-your-PlugPro:901"

 10. If you want to always have swat accessible or are using xinetd for any other communication utility the place S10xinetd in your rcS or mount_optextX file.  If you are just performing a one-time configuration then just manually run S10xinetd when needed and nobody else will have access to swat but you. 
December 28, 2009, at 05:57 AM by Jim DeLaHunt -- Transferred content from Optware/Samba
Added lines 1-48:

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:

(:table border=0 width=100% bgcolor=#eeeeff:) (:cell:)

 
ipkg install samba3-swat

(:tableend:)

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:

(:table border=0 width=100% bgcolor=#eeeeff:) (:cell:)

  
#!/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
 

(:tableend:)

Restart xinetd by executing the xinetd init script: (:table border=0 width=100% bgcolor=#eeeeff:) (:cell:)

  
/opt/etc/init.d/S10xinetd
 

(:tableend:)

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 OddballHero.
Based on work by OddballHero.
Originally by Jim DeLaHunt.
Page last modified on February 24, 2011, at 09:58 AM