SWAT: Difference between revisions

From CBLFS
Jump to navigationJump to search
Epitome (talk | contribs)
mNo edit summary
No edit summary
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
SWAT is the Samba Web Administration Tool.  Once configured, go to http://localhost:901 from your web browser to configure your Samba server.
{{Package-Introduction|SWAT is the Samba Web Administration Tool.  Once configured, go to http://localhost:901 from your web browser to configure your Samba server.}}


=== Dependencies ===
== Dependencies ==
 
== Required ==


=== Required ===
* [[Samba]]
* [[Samba]]
* [[Xinetd]] or [[Inetd]]
* [[Xinetd]]
 
== Optional ==


=== Optional ===
* [[Stunnel]] (Recommended for secure environments)
* [[Stunnel]] (Recommended for secure environments)


Line 21: Line 19:
  echo "swat_tunnel    905/tcp" >> /etc/services
  echo "swat_tunnel    905/tcp" >> /etc/services


If Inetd is used:
Add file to xinetd.d directory for SWAT:
 
echo "swat_tunnel stream tcp nowait.400 root /usr/sbin/swat swat" \
    >> /etc/inetd.conf
/etc/rc.d/init.d/inetd restart
 
If xinetd is used:


  cat >> /etc/xinetd.d/swat_tunnel << "EOF"
  cat >> /etc/xinetd.d/swat_tunnel << "EOF"
Line 65: Line 57:
  echo "swat            901/tcp" >> /etc/services
  echo "swat            901/tcp" >> /etc/services


If Inetd is used:
Add file to xinetd.d directory for SWAT:
 
echo "swat stream tcp nowait.400 root /usr/sbin/swat swat" \
    >> /etc/inetd.conf
/etc/rc.d/init.d/inetd restart
 
If Xinetd is used:


  cat >> /etc/xinetd.d/swat << "EOF"
  cat >> /etc/xinetd.d/swat << "EOF"
Line 78: Line 64:
  service swat
  service swat
  {
  {
     port            = 904
     port            = 901
     socket_type    = stream
     socket_type    = stream
     wait            = no
     wait            = no
Line 90: Line 76:
  EOF
  EOF
  /etc/rc.d/init.d/xinetd restart
  /etc/rc.d/init.d/xinetd restart
[[Category:Network Utilities]]

Latest revision as of 16:18, 19 March 2009

Introduction to SWAT

SWAT is the Samba Web Administration Tool. Once configured, go to http://localhost:901 from your web browser to configure your Samba server.

Project Homepage: Unknown

Dependencies

Required

Optional

  • Stunnel (Recommended for secure environments)

Configuration

Secure Configuration (Requires Stunnel)

Add entries for SWAT and Stunnel in /etc/services:

echo "swat            904/tcp" >> /etc/services &&
echo "swat_tunnel     905/tcp" >> /etc/services

Add file to xinetd.d directory for SWAT:

cat >> /etc/xinetd.d/swat_tunnel << "EOF"
# Begin /etc/xinetd.d/swat_tunnel

service swat_tunnel
{
    port            = 905
    socket_type     = stream
    wait            = no
    only_from       = 127.0.0.1
    user            = root
    server          = /usr/sbin/swat
    log_on_failure  += USERID
}

# End /etc/xinetd.d/swat_tunnel
EOF
/etc/rc.d/init.d/xinetd restart

Add an entry to /etc/stunnel/stunnel.conf:

cat >> /etc/stunnel/stunnel.conf << "EOF"
[swat]
accept  = 904
connect = 905
TIMEOUTclose = 1

EOF

/etc/rc.d/init.d/stunnel restart

Non-Secure (Home) Configuration

Add an entry for SWAT in /etc/services:

echo "swat            901/tcp" >> /etc/services

Add file to xinetd.d directory for SWAT:

cat >> /etc/xinetd.d/swat << "EOF"
# Begin /etc/xinetd.d/swat

service swat
{
    port            = 901
    socket_type     = stream
    wait            = no
    only_from       = 127.0.0.1
    user            = root
    server          = /usr/sbin/swat
    log_on_failure  += USERID
}

# End /etc/xinetd.d/swat
EOF
/etc/rc.d/init.d/xinetd restart
Retrieved from "?title=SWAT&oldid=17679"