LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-08-2004, 10:33 AM   #1
brucerowe
LQ Newbie
 
Registered: Jun 2004
Location: California
Distribution: Suse 11.0
Posts: 12

Rep: Reputation: 0
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
 
Old 06-08-2004, 01:11 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Welcome to LQ.

Have you restarted xinetd?

What firewall rules have you got in place:
iptables -nL
 
Old 06-08-2004, 02:35 PM   #3
brucerowe
LQ Newbie
 
Registered: Jun 2004
Location: California
Distribution: Suse 11.0
Posts: 12

Original Poster
Rep: Reputation: 0
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.
 
Old 06-08-2004, 03:25 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Are you accessing:
http://localhost:901/

From the system running swat?
 
Old 06-08-2004, 04:51 PM   #5
brucerowe
LQ Newbie
 
Registered: Jun 2004
Location: California
Distribution: Suse 11.0
Posts: 12

Original Poster
Rep: Reputation: 0
Yes, I run the command, just like that.

I get the same response whether I use localhost or 127.0.0.1
 
Old 06-09-2004, 12:36 PM   #6
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Have you got the swat packages installed?
rpm -qa | grep swat
 
Old 06-09-2004, 03:05 PM   #7
brucerowe
LQ Newbie
 
Registered: Jun 2004
Location: California
Distribution: Suse 11.0
Posts: 12

Original Poster
Rep: Reputation: 0
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
}
 
Old 06-09-2004, 03:19 PM   #8
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
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.
 
Old 06-09-2004, 04:33 PM   #9
brucerowe
LQ Newbie
 
Registered: Jun 2004
Location: California
Distribution: Suse 11.0
Posts: 12

Original Poster
Rep: Reputation: 0
I ran it and received 230 lines. There was no reference to "901"

Should I be looking for something else?
 
Old 06-10-2004, 04:53 PM   #10
brucerowe
LQ Newbie
 
Registered: Jun 2004
Location: California
Distribution: Suse 11.0
Posts: 12

Original Poster
Rep: Reputation: 0
I ran netstat -a and received 230 lines. There was no reference to "901"

Should I be looking for something else?
 
Old 06-17-2004, 04:34 PM   #11
rmsat
LQ Newbie
 
Registered: May 2004
Location: Southern California
Posts: 21

Rep: Reputation: 15
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
 
Old 06-19-2004, 11:25 PM   #12
captainp
LQ Newbie
 
Registered: Apr 2004
Location: Montreal
Distribution: SuSE, RedHat, SoL
Posts: 8

Rep: Reputation: 0
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.
 
Old 07-03-2004, 11:02 PM   #13
drsuse23
LQ Newbie
 
Registered: Jul 2004
Posts: 3

Rep: Reputation: 0
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!!!
 
Old 07-05-2004, 11:00 AM   #14
rmsat
LQ Newbie
 
Registered: May 2004
Location: Southern California
Posts: 21

Rep: Reputation: 15
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
 
Old 07-06-2004, 03:00 AM   #15
captainp
LQ Newbie
 
Registered: Apr 2004
Location: Montreal
Distribution: SuSE, RedHat, SoL
Posts: 8

Rep: Reputation: 0
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.
 
  


Reply

Tags
smb, swat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SWAT cannot connect to localhost port 901 KhmerDucky Linux - Networking 1 06-10-2005 01:17 PM
Samba - Swat: Cannot Connect to Localhost:901 Sloppyunderfoot Linux - Networking 3 02-10-2005 12:26 PM
help setting swat up and opening port 901 tarax Linux - Security 7 03-18-2004 07:49 PM
SAMBA & SWAT - Connection refused when attempting to connect Localhost:901 ScooterB Linux - Networking 3 12-24-2003 04:15 PM
SWAT does not work when calling localhost:901 themorph Linux - Networking 2 03-06-2002 11:04 PM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration