Operating System - HP-UX
1833780 Members
2204 Online
110063 Solutions
New Discussion

Unable to get Swat to listen on port 901

 
Jane Lecian
Valued Contributor

Unable to get Swat to listen on port 901

I am puzzling over how to configure my system so that I can use swat to configure Samba.

I have a small isolated network. 5 - HP-UX 11.0 workstations, and a number of Windows pc's. The network has no access to the Internet. I have one workstation set up as a NIS master, 1 slave, and the rest as clients. The network has no DNS server.

I installed Samba 2.09 which I got pre-compiled from depot B8725AA_11.00.depot. Everything installed fine.

I have an entry in /etc/services:
swat 901/tcp # SAMBA Web-based Admin Tool

and another one in /etc/inetd.conf
swat stream tcp nowait.400 root /opt/samba/bin/swat swat

I started the Samba daemons (/opt/samba/bin/startsmb). I can share a directory on my unix box, and map the drive on my Windows machines just fine.

When I start up Netscape Communicator (ver. 4.75), and put in http://localhost:901, I get the following error message:
Netscape is unable to locate the server localhost:901. Please check the server name and try again.

If I try using 127.0.0.1:901, I get:
A network error has occurred:
unable to connect to server
The server may be down or unreachable.
Try connecting again later.

When I tried netstat -an | grep 901, it returned nothing. I restarted inetd, and even reboot the workstation, but I can not get it to listen on port 901. I have check the hosts file, and everything looks fine. I can successfully ping 127.0.0.1, the workstation name, and even the other workstations that only the NIS master has in its hosts file. I am wondering if my system need access to a DNS server to work with swat?

The syslog.log has a entry:
test inetd[812]: swat/tcp: Unknown service
I have confirmed that swat does exist at /opt/samba/bin/swat, has permissions -rwxr-xr-x

I am not sure what I should check next. Can anyone point me in the right direction?

Thanks,

Jane
8 REPLIES 8
Craig Rants
Honored Contributor

Re: Unable to get Swat to listen on port 901

Try seeing the status of your software

swlist -l fileset -a state | grep -i CIFS

make sure that it is configured

Then see if you have a smb.conf in the right place.

That version wants it in /etc/opt/samba/smb.conf

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Jane Lecian
Valued Contributor

Re: Unable to get Swat to listen on port 901

Craig,

Thanks for the suggestions.

It looks like it is configured to me:

# CIFS-Development
CIFS-Development.CIFS-PRG configured
# CIFS-Server
CIFS-Server.CIFS-ADMIN configured
CIFS-Server.CIFS-DOC configured
CIFS-Server.CIFS-MAN configured
CIFS-Server.CIFS-RUN configured
CIFS-Server.CIFS-UTIL configured

Also the conf. file exist, and its permissions are:

-rw-r--r-- 1 root users 2174 Jan 29 15:20 /etc/opt/samba/smb.conf

Maybe I should try a different version of Samba?

Thanks,

Jane
Craig Rants
Honored Contributor

Re: Unable to get Swat to listen on port 901

Let's not give up yet.

The permissions on my smb.conf are 660

I just installed this version a few weeks ago on a server so I am not worried about the version.

What happens when you run /opt/samba/bin/smbstatus and /opt/samba/bin/testparm

Hopefully that may point us down the right direction.

C

"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Jane Lecian
Valued Contributor

Re: Unable to get Swat to listen on port 901

I changed the permissions on smb.conf to match yours, and restarted inetd and samba. It didn't help.

Here is the results of smbstatus:
Samba version 2.0.9
Service uid gid pid machine
----------------------------------------------
tmp jel users 15801 user19 (10.1.0.19) Mon Feb 4 12:47:41 2002

No locked files

Share mode memory usage (bytes):
1048464(99%) free + 56(0%) used + 56(0%) overhead = 1048576(100%) total

I've attached the results of testparm.

Thanks for your help,

Jane
Craig Rants
Honored Contributor

Re: Unable to get Swat to listen on port 901

One thing I think you may need to change is to have NIS homedir = No changed to NIS homedir = Yes in you smb.conf. This probably is not the problem with swat. Also there is a homedir map option that can be used with NIS.

On the swat problem, it may be a resolution issue, not sure. There is a name resolve order = hosts lmhosts bcast wins option for global that may help since your are not using dns. It could be having trouble with that, I don't being as I haven't used samba in a NIS environment.

Let me know,
C

One thing I may suggest is to get the O'Reily book on Samba, there is a ton of good info in there.
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Jane Lecian
Valued Contributor

Re: Unable to get Swat to listen on port 901

I tried the options you suggested, but it is still not working.

I downloaded the O'Reilly book from their web site. I'm starting to look through it.

I will let you know if I figure this out.

Thanks for your help!

Jane
Kevin Wright
Honored Contributor

Re: Unable to get Swat to listen on port 901

I am willing to bet that your inetd.conf is not correct..it should be
swat stream tcp nowait root /path/to/swat swat

then for convienence, add this to /etc/services
swat 901/tcp #for samba

inetd -c
then telnet to port 901 and see if the port is open.
Jane Lecian
Valued Contributor

Re: Unable to get Swat to listen on port 901

Well, I figured out the problem.

It had to do with NIS. My machine is an NIS client. The nsswitch.conf was set to search for services in the order of NIS, and "if information is not found to stop searching" (to quote SAM). It would only go to /etc/services if the NIS was not configured. It never got to the "swat 901/tcp" line in my local /etc/services.

Once I put swat 901/tcp in the /etc/services file on the NIS master, swat worked fine. I also tried it by changing the search order in my nsswitch.conf to files, and the NIS. That worked fine also.

Thanks for your help,

Jane