[Bug 1789097] Re: winbind does not work after reboot on Mint 19 / Ubuntu 18.04

Andreas Hasenack andreas at canonical.com
Wed Sep 5 19:34:19 UTC 2018


I'm trying to check why winbind won't recover from the network being
down, so I setup a lxd container where I installed just winbind and the
nss module.

My /etc/nsswitch.conf reads:
hosts:          files wins dns

(I would have ordinarily put dns before wins, but ok, let's try to
reproduce this)

smb.conf has:
[global]
...
        wins server = 10.10.222.254

That IP is another samba server I have.

I then disabled dhcp on eth0, and rebooted the container. It came back
up with no IP on eth0. winbind was running, and name resolution via wins
was obviously not working. I logged in using "lxc exec <containername>
bash" instead of ssh).

I then just ran "dhclient eth0", and retried the name resolution (ping
-c <netbiosname> was my test), and it worked right away. So it was able
to use the newly functional interface.

I didn't see anything out of the ordinary in winbind's logs.

I'll try again with a vm, which should be a bit slower than a lxd
container. And maybe also try without a network card at all, then add
one, and see if winbind needs to be restarted.

In the meantime, can you perhaps grab me some winbind logs during a
machine boot showing the problem? Maybe add "debug level = 3" or 5 to
smb.conf as well.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to samba in Ubuntu.
https://bugs.launchpad.net/bugs/1789097

Title:
  winbind does not work after reboot on Mint 19 / Ubuntu 18.04

Status in samba package in Ubuntu:
  Incomplete

Bug description:
  [copied from the Linux Mint forum]

  Just installed Mint 19 and noticed a WINS name resolution buglet. I
  assume this applies to Ubuntu 18.04 as well.

  Windows, i.e., NetBIOS, name resolution is on Linux provided for by
  the "winbindd" daemon, part of the Samba suite. One does not need
  either of the other two Samba daemons "smbd" and "nmbd" when NetBIOS
  name resolution is all you need: sudo apt-get install libnss-winbind
  (which additionally pulls in "winbind" itself) and adding "wins"
  before "dns" to the "hosts" line of /etc/nsswitch.conf is enough.

  While this works fine directly after installation it does no more
  after reboot due to a systemd unit file dependency issue. The standard
  /lib/systemd/system/winbind.service orders itself after
  "network.target" and "nmbd.service" which if you do not in fact have
  "samba" hence "nmbd.service" installed amounts to "network.target"
  only. It however needs "network-online.target" -- itself a dependency
  of "smbd.service" if you do have that installed as well.

  You can solve things by copying the unit file to its corresponding
  directory under /etc and editing it,

    sudo cp /{lib,etc}/systemd/system/winbind.service
    xed admin:/etc/systemd/system/winbind.service

  to change the line

    After=network.target nmbd.service

  to the two lines

    After=network-online.target nmbd.service
    Wants=network-online.target

  After save and reboot you will have NetBIOS name resolution functional
  without all of the rest of Samba running.

  Note that although this fix is not needed when you do have "samba"
  itself installed the above is still fine also the

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1789097/+subscriptions



More information about the foundations-bugs mailing list