Has smbclient behavior changed from 2.2.8a to 3.0.0?
Brenden J. Bain
bbain at cs.newcastle.edu.au
Tue Nov 4 15:48:38 GMT 2003
> On Mon, Nov 03, 2003 at 10:11:09PM -0600, Christopher R. Hertel wrote:
> > On Tue, Nov 04, 2003 at 12:46:52AM +0100, Simo Sorce wrote:
> > > On Tue, 2003-11-04 at 00:27, Christopher R. Hertel wrote:
> > > > Um...
> > > >
> > > > Note that you're talking to port 445!
> > > >
> > > > Port 445 doesn't do NetBIOS. No NetBIOS names, no NBT.
> > > >
> > > > Not sure why your system is talking to port 445, but it's the
> > > > wrong port for the kind of query you are trying to do.
> > > >
> > > > Could be a bug in the way smbclient tries to connect to a remote
> > > > host.
> > >
> > > Yes, afaik smbclient now tries 445 first by default.
> > I'll have to file a bug report.
> > > Probably we should find out a way to tell smbclient to not use 445
> > > when-L switch is issued and instead go directly to port 139.
> > Yep.
> > It appears that we can still get the list of shares via 445 (that
> > is, NetShareEnum still works), but getting the list of workgroups
> > and servers certainly won't.
> I think this is already fixed in 3.0.1pre1, we make a fresh connection
> to port 139 for this exact purpose.
This already happens in my Samba 3.0.0 setup, however, even then the
connection NetServerEnum2 reply is still empty.
Consequently I tried another "smbclient -L" query on a machine running
Samba 2.2.8x and got all the workgroups on our ad hoc netbios lan. Both
machines where LMBs that had enough time to establish their browse
When I looked at the traces I found that in the first NetServerEnum2
request the "Enumeration Domain" was name of the computer, while
in the second case the "Enumeration Domain" was the workgroup.
I understand that Samba has to treat raw and netbios connections
differently, but this still seems wrong. When Samba 3.0.0 drops from a
445 to 139 connection to enumerate the "workgroup/domain" shouldn't the
"Enumeration Domain" revert to the netbios convention of sending the
"workgroup/domain" name rather than the machine name?
Now a completely unrelated question. Should Samba client
always disconnect after executing the "NetServerEnum"? If the client is
already connected on 139, what is the point of dropping the connection
and then reconnecting the with the server to just run "NetServerEnum2"
on the same IPC$?
Anyways thanks for a great program,
More information about the samba-technical