LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SWAT - Could not connect to port 901 (https://www.linuxquestions.org/questions/linux-networking-3/swat-could-not-connect-to-port-901-a-191115/)

brucerowe 06-08-2004 10:33 AM

SWAT - Could not connect to port 901
 
I'm using Suse 9.1 professional.

I've got Samba almost up and running. But, I'm a newbie and need Swat to configure a few things. I've gone to /etc/services and made sure that I have the entry "swat 901/tcp" I have checked /etc/xinetd.d/swat and added "port = 901" and changed it to "disable = no" I have gone through the steps in the documentation on setting up swat. It all looks correct.

But when I try to run the program, I get the message:
An error occured while loading localhost:901
Could not connect to host localhost (Port 901)

Does anyone know what is wrong?

TIA,

Bruce

david_ross 06-08-2004 01:11 PM

Welcome to LQ.

Have you restarted xinetd?

What firewall rules have you got in place:
iptables -nL

brucerowe 06-08-2004 02:35 PM

I've re-started xinetd (actually, re-started). I'm not using a firewall. This is all behind a NAT router that serves as our firewall. When I give the iptables -nL command, I get:
Chain Input policy Accept
Chain Forward policy Accept
Chain Output policy Accept

Do you have any other suggestions?

Thanks for responding.

david_ross 06-08-2004 03:25 PM

Are you accessing:
http://localhost:901/

From the system running swat?

brucerowe 06-08-2004 04:51 PM

Yes, I run the command, just like that.

I get the same response whether I use localhost or 127.0.0.1

david_ross 06-09-2004 12:36 PM

Have you got the swat packages installed?
rpm -qa | grep swat

brucerowe 06-09-2004 03:05 PM

Yes, I do have the packages installed. That was easy to check using the help files. I ran a couple commands and here is what they returned:
whereis swat
swat: /usr/sbin/swat /usr/share/man/man8/swat.8.gz

find /usr/share/samba/swat -print
/usr/share/samba/swat
/usr/share/samba/swat/help
/usr/share/samba/swat/help/smbcontrol.1.html
/usr/share/samba/swat/help/diagnosis.html
. . . and another 160 lines of help files

strings /usr/sbin/swat | grep "/swat"
<BODY background="/swat/images/background.jpg">
<A HREF="/swat/help/smb.conf.5.html#%s" target="docs"> %s</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %s <br><span class="i18n_translated_parm">%s</span>
<A HREF="/swat/help/smb.conf.5.html#%s" target="docs"> %s</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %s
<A HREF="%s/%s"><img border="0" src="/swat/%s" alt="%s"></A>
<A HREF="/swat/help/smb.conf.5.html#printcapname" target="docs">%s</A>
/usr/share/samba/swat

And, here¡¦s this guy:
# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost
user = root
server = /usr/sbin/swat
log_on_failure += USERID
disable = no
}

MS3FGX 06-09-2004 03:19 PM

It sounds like it can't bind to port 901, which means something is already listening on it.

Try:

netstat -a

Before you try and run SWAT and see if there is anything on 901.

brucerowe 06-09-2004 04:33 PM

I ran it and received 230 lines. There was no reference to "901"

Should I be looking for something else?

brucerowe 06-10-2004 04:53 PM

I ran netstat -a and received 230 lines. There was no reference to "901"

Should I be looking for something else?

rmsat 06-17-2004 04:34 PM

i am right where you are, I am also having printing problems. I think Samba and Swat aren't up to par. You can reach me direct by dlo@charter.net.
I tried netstat -a and got the same with no reference to 901
Dan

captainp 06-19-2004 11:25 PM

Hi Guys.

I have some info that i hope can help your Samba and Swat problems.

in /etc/xinetd.d the original swat file looks like this below: ( for my install of redhat 9 anyway)

# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
disable = no
port = 901
socket_type = stream
wait = no
only_from = localhost
user = root
server = /usr/sbin/swat
log_on_failure += USERID
}

You will need to change one line and add one line. Add to the swat file in /etc/xinetd.d protocl = tcp and the line only_from = localhost put in the ip address 127.0.0.1 so that it looks like this only_from = 127.0.0.1

# default: off
# description: SWAT is the Samba Web Admin Tool. Use swat \
# to configure your Samba server. To use SWAT, \
# connect to port 901 with your favorite web browser.
service swat
{
disable = no
port = 901
protocol = tcp
socket_type = stream
wait = no
only_from = 127.0.0.1
user = root
server = /usr/sbin/swat
log_on_failure += USERID
}[

This has worked for me. Let us know if it works for you too, hope it does.

drsuse23 07-03-2004 11:02 PM

I was very frustrated by this as well - - felt it should work out of the box... After trying just about everything, I fell upon something that probably only a newbie would encounter. Those who have been at it for a while probably take it for granted. Try this...

Go into YaST or if you're not using SuSE, you should have a Network Configuration tool. In SuSE I go into the YaST then Network Services then Network Services (icon looks like a traffic light). When you click on this you will see a list of services on your system. If they are greyed out (all of mine were), you simply need to enable services. You can actually see SWAT in this list, and if you've done everything else correctly according to manuals, etc. You will see that it is ON. Give it a shot, after I did this I was finally able to get into SAMBA!!!

rmsat 07-05-2004 11:00 AM

Hi everyone,

so what i have found is that

only_from = localhost is not even needed. The only reason you have only_from is to limit the logons to swat to the local host. I remarked out locall host and am now configuring swat from my w2k machine, which I need due to some apps. So it is really convient.

protocal = tcp is mandatory.

but i am still trying to figure out how to see what else is listening on port 901. Anyone know how to read the output of netstat?

D

captainp 07-06-2004 03:00 AM

Be careful about using swat accross the network, from another machine if you are not using ssl, or the password username combinaton is sent in clear text and this means that the root account is sent across the network without any encryption. not the best of scenarios.


All times are GMT -5. The time now is 12:12 AM.