[Samba] why Samba using /etc/hosts?

Rashkae rashkae at wealthmap.ca
Sun Mar 10 11:45:02 GMT 2002


I might as well throw in my two cents as well....

There are some configurationg of Samba, (I believe, currently, if you have
a hosts allow or hosts deny diretive) that causes samba to make a reverse
lookup of all connecting clients.  The problem is not that Samba uses
/etc/hosts, but rather, the request to lookup an IP address like
192.168.0.122 is sent to a helpless internet DNS server that spins it's
wheels furtively trying to resolve the address.  Course, by the time the
DNS server gives up, the SMB connection timed out.

Putting an etry in /etc/hosts prevents this because most systems are
configured to first look in /etc/hosts before DNS.  Disabling DNS on the
Samba server should also prevent the problem (the lookup will just fail
right away, in which case Samba continues on its merry way.)  You can also
configure Bind as a caching DNS server that will also perform reverse
lookup for your internal network addresses.

To resovle this in my office, I just simply created a script that
generated entries for 254 possible hosts in my DHCP range... (10.0.0.1 to
10.0.0.255, named host001 to host255, respectively.) and pasted those into
/etc/hosts.


____________________________________________
Mar 10  2:41pm
                       _
ASCII ribbon campaign ( )
 - against HTML email  X
             & vcards / \
On Sun, 10 Mar 2002, Joel Hammer wrote:

I don't know the answer, but, nobody has responded for over 24hours so I'll put
my two cents in.
Use nmblookup from the samba server, and see what sort of debugging
messages you get when you try to find some dynamically assigned host.
Read man nmblookup to see what options are available.
Joel




On Sat, Mar 09, 2002 at 01:00:14AM -0800, Widodo Krisman wrote:
> Hello,
>
> I've had this problem for quite a while.  Using ip from my dhcp addresses from 192.168.1.10-.20, I can't browse or see my samba server.  But using a static ip .1-.9, I can browse to my samba server just fine.  All my static ip addresses have entries in /etc/hosts but not the dynamic ip from dhcp.  I found out that if I add any hostname in my /etc/hosts say for 192.168.1.15, then I can start browsing my samba server again.
>
> So my question is, how come samba is using my /etc/hosts names?  I never had this problem before I upgrade my samba and dhcp.  Below are my configuration:
> - Redhat 7.1 (kernel 2.4.2.2)
> - dhcp-server-3.0rc12-3cra
> - samba-2.2.2-20011013
>
> I can send my smb.conf if necessary but I think it's fine since everything is fine (login script, see samba, etc) when I put an entry in my /etc/hosts file.
>
> Please advise
>
> =wk=
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  http://lists.samba.org/mailman/listinfo/samba





More information about the samba mailing list