Problem, possibly new for 2.2.0, with lmhosts
davecb at canada.sun.com
Wed May 23 12:04:05 GMT 2001
One of my sites has a problem with clients being unable
to resolve the right addresses from a Samba WINS server when
connecting from a Win9x system, as well as nmblookup.
The WINS server has an lmhosts file containing
The smb.conf on the WINS server says:
We set the samba server to be a WINS server with the following
configuration parameters (among others - see attached for all the
wins support = Yes
wins proxy = Yes
dns proxy = yes
name resolve order = lmhosts host wins bcast
local master = yes
os level = 233
preferred master = True
domain master = True
What we expected to happen is that the wins server would
attempt to discover the address, fail to find it in dns
(dns proxy) but would find it in lmhosts. This is not at
all what happens.
On re-reading the caveats on -H in the nmbd(8) man page, I see that
it says "this file are NOT used by nmbd to answer any name
queries. Adding a line to this file affects name NetBIOS resolution
from this host ONLY.".
I'm puzzled: this caveat isn't in smb.conf(5), which says that
"This option is used by the programs in the Samba suite to determine
what naming services to use and in what order to resolve host names
to IP addresses."
The behavior we see with smblookup and the win9x client is
the one we'd expect from under smbd -H:
./nmblookup -R -U homer sunlight1
INFO: Debug class all level = 2 (pid 22783 from pid 22783)
added interface ip=22.214.171.124 bcast=126.96.36.199
querying sunlight1 on 188.8.131.52
name_query failed to find name sunlight1
If this is intentional (and it may be), what's the use of
a name resolve order option that doesn't affect the services
that nmbd actually provides? Anyone recollect a reason, or is
this an oversight (i.e., a bug (;-))
Looking at the code, it's used only in internal_resolve_name(),
which is called by resolve_name(), find_master_ip() and get_dc_list(),
and resolve_name(0 is called by both cli_connect() and
so the code seems to use it in the general case...
If it's a bug, have we just introduced it?
David Collier-Brown, | Always do right. This will gratify
Performance & Engineering Team | some people and astonish the rest.
Americas Customer Engineering | -- Mark Twain
(905) 415-2849 | davecb at canada.sun.com
More information about the samba-technical