[Samba] why Samba using /etc/hosts?

Jelmer Vernooij jelmer at nl.linux.org
Sun Mar 10 13:01:06 GMT 2002


> 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.
Try to install nscd (the Name Service Switch Caching Daemon). It tries
to cache the results from all nss lookups (including passwd and host
lookup). Oh, and it caches 'not found' entries as well....

Jelmer

-- 
Jelmer Vernooij <jelmer at nl.linux.org> - http://nl.linux.org/~jelmer/
Development And Underdevelopment: http://library.thinkquest.org/C0110231/
Listening to Dooms night v2
 21:51:02 up 3 days, 35 min, 10 users,  load average: 0.15, 0.16, 0.11




More information about the samba mailing list