Problem, possibly new for 2.2.0, with lmhosts

Steve Langasek vorlon at
Wed May 23 17:57:07 GMT 2001

On Wed, 23 May 2001, David Collier-Brown wrote:

> Steve Langasek wrote:
> > But the *DNS server* that you're running on your machine does not use
> > /etc/hosts when responding to DNS requests from other machines.  Clients on
> > the local machine use /etc/hosts; nothing else does.

> 	That makes sense, but if I say "hosts: files dns" in
> 	my /etc/nsswitch.conf, I do expect everything that
> 	uses name service to look in files first, then dns.

> 	I expected the same from name resolve order: if I
> 	say "name resolve order = lmhosts host wins bcast"
> 	I expect all clients [see next para] of the service
> 	to look in lmhosts, then the hosts file, then wins
> 	and finally broadcast.

> 	From what you said, only the samba server uses this, and
> 	only when it is acting as a client... to what???  Does
> 	this only apply to smbclient?

The Samba server does act as a client occasionally.  If you have a 'password
server' setting, I believe this can be specified as a netbios name, in which
case 'name resolve order' is used to turn that name into an IP.  The big users
of this setting are still client apps, however; smbclient is one,
and rpcclient, smbmount, smbsh, and libsmbclient-based apps would be others.

Everything that uses netbios name service looks at 'name resolve order', just
as everything that uses name service looks at /etc/nsswitch.conf.  But just as
bind doesn't look at nsswitch to find out where it should get its DNS
information, nmbd doesn't look at 'name resolve order' because it's the server
/providing/ the netbios information, not a client consuming it.

Steve Langasek
postmodern programmer

More information about the samba-technical mailing list