NetServerEnum2 from libsmbclient on port 445.
Richard Sharpe
rsharpe at richardsharpe.com
Tue Apr 8 16:37:15 GMT 2003
On Tue, 8 Apr 2003, Stephan Kulow wrote:
> 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.
I think perhaps we should try 139 by default, or if we connected on 145,
we should use and RPC not RAP.
Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org,
sharpe[at]ethereal.com, http://www.richardsharpe.com
More information about the samba-technical
mailing list