0

For the past day, I have been trying unsuccessfully to let my Ubuntu VM be able to resolve NetBIOS names on the local network, to find some non-computer devices (Printers, special barcode machines, etc..) that don't have a fixed IP.

At first, I assumed I am failing to configure the usage of winbind/wins for resolving, even though I had read every webpage that ever mentioned nsswitch.conf, and I was sure my configuration should be correct.

running nmblookup printername returns a successful result that looks like:
x.x.x.x printername<00>
And this was my first clue, the <00> service type. I fired up wireshark, and tried to ping printername, and I saw a NetBIOS broadcast asking for printername<20>, to which no one replied.

I stopped the winbindd service, and run it manually in foreground using:
sudo winbindd -F -S -d 10
then tried the same ping, and I saw winbindd attempting the same erroneous query with <20> instead of <00>.

Why is this happening? Where can this be configured?

EDIT: Closing this question as this is hardcoded in the source. Digging through the code, I found the function in winbindd_wins_byname.c, harcoded as such:

subreq = resolve_wins_send(state, ev, state->request->data.winsreq, 0x20);

0

You should be getting a return of:

x.x.x.x printername<20>

windbindd is correct, because a service type of <20> is for File/Print sharing services. Have you tried the WINS service configuration from samba? The default service type will be provided if the client requests a share not listed in smb.conf.

  • I am not requesting any File/Print sharing service. I am just trying to find an actual physical network printer. Some are HP that are smart enough to integrate with our DNS, others are lesser known, but ALL of them, even HP ones, will not answer to a <20> query, only <00> queries. This can be seen by issuing "nmblookup printername -S", it will list available services, and only <00> is there, which winbindd does not query for. – Waleed Hamra May 31 '17 at 5:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.