[PATCH] samba.netbios module Python 3 compatible

Lumir Balhar lbalhar at redhat.com
Tue Aug 8 08:27:01 UTC 2017


On 08/08/2017 06:55 AM, Andrew Bartlett wrote:
> On Wed, 2017-08-02 at 11:23 +0200, Lumir Balhar wrote:
>>
>> 'addomain' is in $DOMAIN and '127.0.0.30' is in $SERVER_IP.
> Try using $SERVER not $DOMAIN.  $DOMAIN shouldn't work, it would be a
> #1b and #1c name.
Thanks, but using 'addc' ($SERVER) instead of 'addomain' ($DOMAIN) 
doesn't help.
>
>>   From this point of view it seems that there is something wrong in
>> the
>> testing environment and samba isn't providing netbios but when I try
>> the
>> same query with nmblookup, it works.
>>
>> $ bin/nmblookup addomain
>> 127.0.0.30 addomain<00>
>>
>> I don't know what I am doing wrong. Could you please help me find
>> out
>> why is there a difference between netbios queries from the Python
>> module
>> and nmblookup tool?
> They are backed by quite different codebases.  nmblookup4 which is no
> longer installed would be a closer match.
I've tried both with the same result:

$ ./bin/nmblookup addc
127.0.0.30 addc<00>

$ ./bin/nmblookup4 addc
127.0.0.30 ADDC<00>

 >>> from samba import netbios
 >>> n = netbios.Node()
 >>> n.query_name('addc', '127.0.0.30', timeout=3)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
samba.NTSTATUSError: (-1073741643, '{Device Timeout} The specified I/O 
operationod expired.')
>
>> Thank you. Have a nice day.
>> Lumír
> Sorry for the long delay and poor handling of this.  Your patches are
> important to us.
>
> Andrew Bartlett
>
It's not a problem, we have a common goal.

I am probably not skilled enough to debug this issue when the Python 
module works in my LAN but not in the testing environment. Moreover when 
other tools are working in the testing environment.

Thanks for any help.
Lumír



More information about the samba-technical mailing list