linux : swat for linux AS

Brian K. White brian at aljex.com
Wed Mar 16 18:26:26 PST 2005


----- Original Message ----- 
From: "Enrique Arredondo" <henry at vegena.net>
To: <filepro-list at lists.celestial.com>
Sent: Wednesday, March 16, 2005 7:27 PM
Subject: OT: linux : swat for linux AS


>I know this is way off topic by I ask here because here are the brightests 
>human beings of the planet :)
>
> Is there a samba-swat combo for REDHAT AS (advance server) ?  I can make 
> samba work but swat is not installed and I look at the RPM's that came on 
> the CD's and there is no such thing as SWAT
>
> if I do uname -a I get :
>
> Linux atksco 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003 i686 i686 
> i386 GNU/Linux
>
> I want to put filepro reports on a samba folder but I want to use SWAT 
> instead of manually configuring the samba.


grep -v disable /etc/xinetd.d/swat >xx
mv -f xx /etc/xinetd.d/swat
/etc/init.d/xinetd restart

You'r welcome.

ok ok ok, i'll explain that... :)

Do you really know it's not already installed? It is usually installed as 
part of the samba package, and usually not enabled by default.
You can enable it one of two ways, and which way is a purely personal 
preference.

Method 1, preferred:
(because it's not a service that you need to use 100 times a day every day 
and because the setup is already in place and merely needs to be turned on)

configure it in inetd or xinetd, whichever you have, and redhat switched 
from inetd to xinetd a long time ago so I'm sure you have xinetd.
to configure it in xinetd, you need to have a script file in wherever xinetd 
holds its service descriptor files these days or wherever red hat has 
modified it to hold them. Probably something like /etc/xinetd.d
In fact it's probably exactly that. ;)
In this directory I bet you will even discover there is already a file in 
there named "swat"
edit the file (it's a script/text file)

swat is working on my Suse box, and it's /etc/xinetd.d/swat file looks like 
this:

------start------
# SWAT is the Samba Web Administration Tool.
service swat
{
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/sbin/swat
        only_from       =  127.0.0.1
        log_on_failure  += USERID
}
------end------

Your file may look somewhat different.
you may have a line that says disable = yes or enable = no or you may have a 
comment line that says
# default: off

Try to do whatever seems to be the obvious edits.
Remove the disable line entirely if it exists
Remove the default : off line if it exists
Verify that whatever the "server=" line says, that the binary really exists 
there and maybe edit that line if necessary.
If all else fails, this is a known working file that may not conform to 
certain redhat standards, but should still work since xinetd doesn't really 
care about redhat vs suse vs debian etc... only that all the options in the 
file are valid according to xinetd itself.

The "only_from=" line should be obvious. You can remove the line entirely 
and then connect to swat from anywhere, or leave it like above and only be 
able to use swat from within X right on the actual linux box console. (or 
lynx I guess, it might even be navigable in lynx, then you could ssh to the 
box from anywhere and use lynx, I never tried it)

You probably have to stop & start xinetd to get it to re-read the directory 
and start doing swat.

This is what my commands at the top do, if it wasn't obvious by now.

Method 2, not so preffered)
make a new start/stop rc script for swat in /etc/init.d, modeled after one 
of the several other scripts in there.
run it with "start" ie: "/etc/init.d/swat start"
make a couple symlinks so it also gets started at boot.
ln -s /etc/init.d/swat /etc/rc3.d/S99swat
ln -s /etc/init.d/swat /etc/rc5.d/S99swat

doing this results in a swat binary running all the time, listening for 
connections all the time.
this is almost certainly not necessary
with xinetd, what happens is, the one program "xinetd" listens on many ports 
and when connections come in, it starts up the appropriate server binary and 
hands off the connection on demand. It's more efficient because most of the 
time there is no connection being made for all those services, and so it's 
more efficient to just have this one little program keeping an eye on the 
door instead of a seperate program for each service. Plus, it's a fact of 
life that sometimes programs aren't prfect and gradually eat memory over 
time, or crash after a long time etc... so with xinetd, the various programs 
get started on the spot run for the duration of one connection, and go away. 
They never run for months straight, so if they are less then perfect, it's 
still no problem.

Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani







More information about the Filepro-list mailing list