NetServerEnum2 from libsmbclient on port 445.

Stephan Kulow coolo at kde.org
Tue Apr 8 07:38:41 GMT 2003


On Tuesday 08 April 2003 09:00, Brenden Bain wrote:
> Hi all,
> 
> I was doing some coding with 'libsmbclient' and found an interesting problem. 
> Our network consists of win2k, winXP, win9x, MacOS bunched into workgroups 
> (i.e. no win2k or NT domains). When I used libsmbclient to retrieve a list of 
> computers in a workgroup (e.g URL of smb://workgroup) the 
> following situations occurred:
> 
> 1. the the NetServerEnum2 request was sent to the workgroup's LMB on port 445 
> and a valid reply was returned, but was empty even though the workgroup is 
> not.
> 
> 2. the the NetServerEnum2 request was sent to the workgroup's LMB on port 445 
> and a valid reply was returned that listed the workgroup correctly.
> 
> 3. the the NetServerEnum2 request was sent to the workgroup's LMB on port 139 
> and a valid reply was returned that listed the workgroup correctly.
> 
> On the other hand, when I use smbclient situtation 3 always occurs, even when 
> it has the option of sending SMB over raw TCP. Why does this happen ?  Can I 
> fix it by just altering libsmbclient to always connect to 137, or is there a 
> reason it tries to connect to 445 ?
> 
> Another interesting point is that NetShareEnum works no matter which port it 
> is sent to. Here are some specs
> 
This is the same problem that I reported yesterday. What version of windows is your
LMB? For me it works if the LMB is win9x (most likely it doesn't respond to port 445
at all :), but not when it's XP ;(
I even attached the tcpdump log. But I haven't tried accessing port 139, so this is
something to try indeed.

Greetings, Stephan



More information about the samba-technical mailing list