Resolve hostnames with NetBIOS instead of mDNS on Linux
2
votes
0
answers
4095
views
Immediately after installing Debian 9 Stretch, the avahi-daemon has already been installed, so it is working to send a ping between Linux with avahi-daemon installed on each of them.
For example, when there is a named 'alice',
$ ping alice.local
returns a normal response.
I want to do the following things:
- I want to resolve names of Windows from Linux, but I do not want to install the Bonjour or something like that on Windows.
- I want to resolve names with NetBIOS (WINS) instead of mDNS.
- I do not want to add a suffix such as .local
in the name.
So I deleted avahi-daemon and installed winbind.
# dpkg --purge avahi-daemon libnss-mdns
# apt-get install winbind libnss-winbind
And, added setting to use 'wins' in /etc/nsswitch.conf
. e.g. hosts: files dns wins
With the above setting, $ ping mywindows
will not respond. However, $ nmblookup mywindows
can successfully get the IP address.
Previously, when I was using Debian 8 Jessie, it should have been successful, but using Debian 9 Stretch will not be my expectation.
Is there something missing?
Asked by soramimi
(121 rep)
Jan 28, 2018, 09:23 AM
Last activity: Feb 4, 2018, 10:30 AM
Last activity: Feb 4, 2018, 10:30 AM