Ubuntu – Windows hostnames are not resolved


I know that similar questions has already been asked. However, as suggested in the answers to that question I have the winbind package installed and have wins in /etc/nsswitch.conf:

hosts:          files mdns4_minimal [NOTFOUND=return] dns wins mdns4

Nevertheless, attempts to ping windows hostnames give

ping: unknown host <hostname>

Restarting winbind service doesn't help.

I have Ubuntu 11.10 and winbind 3.5.11.

Best Answer

I had the same issue. Changing the location of wins in nslookup.conf did not work, or possibly only got me part of the way there. Install the package libnss-winbind to be able to find windows computers by hostname. I tested it with and without the package installed, and it is indeed necessary for resolving any windows hostname.