Samba - Name Resolve Order - host/s misatch

  • Setting the name resolve order value to
    "name resolve order = hosts wins lmhosts bcast"

    causing loading to fail because samba-tool testparm returns

    Code
    handle_name_resolve_order: WARNING: Ignoring invalid list value 'hosts' for parameter 'name resolve order'
    pm_process() returned No
    ERROR: Unable to load default file
    File "/usr/lib/python2.7/dist-packages/samba/netcmd/testparm.py", line 86, in run
    lp = sambaopts.get_loadparm()
    File "/usr/lib/python2.7/dist-packages/samba/getopt.py", line 94, in get_loadparm
    self._lp.load_default()

    setting the value to "name resolve order = host wins lmhosts bcast" resolves the loading problem

    but leaves the system with error

    wins_registration_timeout: wins server 127.0.0.1 timed out registering ip


    i had to copy the "hosts" file to "host" to resolve

    • Offizieller Beitrag

    I see donh has replied to you, I have just checked my own omv5 smb.conf file which is running in a vm for testing, your above reference does not appear in mine, and the file clearly states # WARNING: Do not edit this file, your changes will get lost.

  • I see donh has replied to you, I have just checked my own omv5 smb.conf file which is running in a vm for testing, your above reference does not appear in mine, and the file clearly states # WARNING: Do not edit this file, your changes will get lost.

    you don't edit the file, you enter it in the gui under advanced options

  • what does why, have to do with fixing a bug.


    bottom line is, some documentation/systems use "hosts" in the name resolve order and some use "host"

    In any case, that seems to correlate directly to the name of the "hosts" file on a given system and it is a bug.

    • Offizieller Beitrag

    From the man page.

    name resolve order (G)

    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. Its main purpose to is to control how netbios name resolution is performed. The option takes a space separated string of name resolution options.

    The options are: "lmhosts", "host", "wins" and "bcast". They cause names to be resolved as follows:

    •lmhosts : Lookup an IP address in the Samba lmhosts file. If the line in lmhosts has no name type attached to the NetBIOS name (see the manpage for lmhosts for details) then any name type matches for lookup.

    •host : Do a standard host name to IP address resolution, using the system /etc/hosts, NIS, or DNS lookups. This method of name resolution is operating system depended for instance on IRIX or Solaris this may be controlled by the /etc/nsswitch.conf file. Note that this method is used only if the NetBIOS name type being queried is the 0x20 (server) name type or 0x1c (domain controllers). The latter case is only useful for active directory domains and results in a DNS query for the SRV RR entry matching _ldap._tcp.domain.

    ...


    So it should work with /etc/hosts file. If it is not it is an upstream bug. Not an OMV bug. FYI

  • gwaitsi

    Hat das Label gelöst hinzugefügt.
  • if i don't make the order "wins host lmhosts bcast" i get the following error


    nmbd[984]: [2020/05/04 22:45:19.109990, 2] ../source3/nmbd/nmbd_nameregister.c:193(wins_registration_timeout)

    nmbd[984]: wins_registration_timeout: WINS server 127.0.0.1 timed out registering IP 192.168.24.10

  • did you not read my response? If i don't put wins first, i get the following error


    "wins_registration_timeout: WINS server 127.0.0.1 timed out registering IP 192.168.24.10"


    if i put wins first, i do not get that error

  • i am adding that option, because the default is

    host wins lmhost bcast


    and with that i get the error as described above (for the 3rd time).


    if i add the option as

    wins host lmhost bcast


    i do not get the error.

  • i assume you to be antagonising because you are suffering cabin fever.


    if you can't tell me why wins_registration is timing out on 127.0.0.1, i can't tell you why i have to put wins first.

    obviously it is something to do with localhost and if i knew the answer, i wouldn't spend my time trying to find the solution here.

  • gwaitsi

    Hat das Label gelöst entfernt.
    • Offizieller Beitrag

    i assume you to be antagonising because you are suffering cabin fever.

    OK now you're being rude!!


    Let me guess what you have done, you have enabled the WINS option under OMV's SMB/CIFS, why, I don't know because you can't answer the question. But if this is what you have done then that is completely, totally unnecessary in today's environment, I haven't used WINS since the days of NT4 even Microsoft tell you to decommission WINS servers.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!