Progress on Win 98 Browsing Problem

Stephen L Arnold arnold.steve at ensco.com
Mon Mar 29 20:59:02 GMT 1999


When the world was young, <clifford_ilkay at dinamis.com> carved some 
runes like this:  

> A couple of weeks ago, I posted a few messages about problems that I was
> having with a Win 98 client not being able to browse or connect to Samba
> 2.0.3 running on Linux. Thanks to help from David Collier-Brown and Hugh
> Redelmeier, I stumbled across the culprit although I still do not
> understand why it behaves as it does.
> 
> Samba is running as the WINS server. There is a line in nsswitch.conf
> which reads:
> 
> hosts:      files nisplus nis dns
> 
> 
> When I looked in log.smb, I saw the following line:
> 
>   Gethostbyaddr failed for 192.168.1.54
> 
> where 192.168.1.54 is my Win 98 client.
> 
> When I changed the hosts: line in nsswitch.conf to read "files", I was
> able to browse and connect very quickly.
> 
> I have dial-on-demand on the Linux box via diald. I restored nsswitch.conf
> to its original state, i.e. hosts: files nisplus nis dns. When I try to
> browse the NN, diald brings up the PPP connection to do a DNS lookup.
> Until the PPP connection is made, the NN window does not display anything
> other than the sweeping flashlight. As soon as the PPP link is up, the NN
> is refreshed and I can browse and connect to the shares on the Linux box
> very quickly from the Win 98 client. Again, I notice a Gethostbyaddr
> failure in log.smb. Clearly, there is some connection between WINS and DNS
> that I do not understand. The documentation is sketchy on this. Why am I
> getting the gethostbyaddr failure? How can I prevent Samba from doing DNS
> lookups?

What is the "name resolve order" setting in your smb.conf file?  If 
it's not specified explicitly, then the default is:

name resolve order = lmhosts host wins bcast

I'll bet you don't have an lmhosts file on the samba box, do you?  
I had a similar problem with DNS lookups and telnet between win95 
and the samba/linux host on my little network at home.  I had named 
running in the default RedHat caching only setup, so I had the 
win95 client with the linux IP as the first DNS server, and then 
the two ISP DNS servers.  I was getting a delay of about 30-60 
seconds when trying to telnet from win95 to linux (with no PPP link 
active; the linux/samba box is also my ip-masq gateway to the 
outside world).  I use the ISP's domain name on my internal network 
(at this point I'm not sure why), and the delay turned out to be 
because of the order I specified names in /etc/hosts.  I was under 
the impression it was supposed to be like this:

IP address	FQDN			nickname
192.168.0.2	hostname1.domain.org	hostname1
192.168.0.3	hostname2.domain.org	hostname2
etc...

But when I reversed the names like this:

IP address	nickname		FQDN
192.168.0.2	hostname1		hostname1.domain.org

the delay disappeared and the server responded immediately.  I 
think the samba stuff is somewhat hard to configure because *both* 
name resolution schemes have to be working right to get browsing 
and other services.  The above setup works fine for me; it allows 
telnet/ftp to resolve nicknames, and NN/Exploder works fine too.  
The only weird part is Netscape won't resolve a URL with a 
nickname; it needs the FQDN.  Go figure.

Your default "hosts: files nisplus nis dns" line should be okay, if 
your clients have wins and samba has an lmhosts file with the 
client name to IP mapping.  In theory, win98 should be the same as 
win95 on name resolution...

I'll check my nsswitch.conf and other things when I get home and 
post the setup info.

Steve


****************************************************************
Stephen L. Arnold                        Senior Systems Engineer
ENSCO Inc.                        email:  arnold.steve at ensco.com
P.O. Box 5488                         www:  http://www.ensco.com
Vandenberg AFB, CA  93437                    voice: 805.606.8838
                                               fax: 805.734.4779
#include <std_disclaimer.h>
****************************************************************


More information about the samba mailing list