NetBIOS resolution not working via lookup, ping etc., but nmblookup works

Hi all,
what can be the reason why ping, nslookup and other tools (not to mention implicit name resolution, i.e. by providing a NetBIOS name to a browser) doesn’t work when nmblookup works fine?

I’m running Ubuntu 22.04 with kernel 5.15.

I have a machine called t2gst1uk which runs on 192.168.200.5. nmblookup reports this correctly:

# nmblookup t2gst1uk
192.168.200.5 t2gst1uk<00>

However, when using ping, this fails:

 ping t2gst1uk
ping: t2gst1uk: Temporary failure in name resolution

A winbindd is running:

[global]
workgroup = WORKGROUP
netbios name = XCHANGE
disable netbios = no
wins support = yes
name resolve order = bcast wins lmhosts

and the /etc/nsswitch.conf looks like this:

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         files systemd
group:          files systemd
shadow:         files
gshadow:        files

hosts:          files wins dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Additionally, this worked fine unter Ubuntu 14.04. (yes, way old). All the settings are the same.

What is going on? What additional info might I provide so solve this problem?

BR
Karim

NSS needs a library for each Name Service it’s supposed to use. In the case of winbind / wins that should be libnss_winbind.so2 and libnss_wins.so.2 both of which should be in the package libnss_winbind. Do you have that package installed ?

1 Like

Yes, I have:

ii  libnss-winbind:amd64                   2:4.15.13+dfsg-0ubuntu1.8               amd64        Samba nameservice integration plugins

Why doesn’t it work?

BR
Karim

Sorry to reply to myself here.

Is there any reason why a DNS inquiry would not use the libs included in libnss-winbind?

As I mentioned, nmblookup works fine; it’s just the name resolution of Linux which doesn’t find name shared via NetBIOS messages.

BR
Karim