NetServerEnum2 from libsmbclient on port 445.

Brenden Bain bainey at pcpro.net.au
Tue Apr 8 11:39:41 GMT 2003


Hi,

> This is an interesting area of study.  The NetServerEnum2() function
> call is supposed to return a list of NetBIOS names.  SMB on port 445
> is NetBIOS-less SMB.  In theory, it makes some sort of sense that a
> NetServerEnum2() call via port 445 would not return any NetBIOS server
> names.

That seems to make sense.

> My gut, though, is that the LMB was recently elected and had not had
> time to rebuild the Browse List.  Can you verify that for me (one way
> or the other)?

I'm quite sure the LMB is up-to-date. If I first try to get the workgroup list 
using libsmbclient I get am empty NetServerEnum2 reply. If I then call 
smbclient -L on the LMB, then the NetServerEnum2 reply contains all the 
computers in the workgroup. Also if I put a block on all TCP connections 
leaving from port 445, to force libsmbclient to try port 139, then I get a 
NetServerEnum2 reply with all the computers in the workgroup. As smbclient 
always uses 139 I would assume that the connection to 445 causes the error. 
This problem can be replicated on win2k and win2000. I am not sure about 
win9x, but as they do not reply to 445 they should not have the same problem.

At the same time there is at least one winXP system where the NetServerEnum2 
reply is vaild when the request is sent to port 445. Maybe this is a 
configuration option, service release, or my mistake ?

Regards, 

Brenden.



More information about the samba-technical mailing list