libsmbclient status

Richard Sharpe rsharpe at
Mon Nov 4 02:28:21 GMT 2002

On Sun, 3 Nov 2002, Christopher R. Hertel wrote:

> Richard Sharpe wrote:
> > 
> > On Sat, 2 Nov 2002, Fabien Chevalier wrote:
> > 
> > >
> > > Hi all.
> > > I'm curently playing with KDE smb slave, to try to improve it. It
> > > is based on libsmbclient, so... i am playing with libsmbclient
> > > too.
> > >
> > > I found some strange things with libsmbclient.
> > > -The first version i tried, 2.2.6, had a problem listing
> > > workgroups on the network. All the rest worked fine.
> > 
> > OK, you need to initialize your workgroup to something in
> > ~/.smb/smb.conf, and then it will list workgroups. At least that is how
> > it works at the moment in head.
> >
> > This restriction could be lifted, but would require two changes:
> > 
> > 1. The code that gets unhappy if smb.conf fails to load will need to
> > change.
> > 
> > 2. If a master browser for workgroup cannot be found, then we could do a
> > name status query on the local node, which is not guaranteed to work, or
> > we could prompt for a name.
> If you are given "smb://", then just look for the __MSBROWSE__ name.  You
> may get multiple replies (a good thing).  Try each of those until you can
> get a list of workgroups.  If *that* fails, you can go as far as doing an
> adapter status on each of the responding __MSBROWSE__ nodes and listing
> their <1D> names.  You shouldn't need a default workgroup in order to find
> the workgroup list, though.  (Yes, it's kludgy, but this is CIFS!)

Hmmm, but that name is \000\001MSBROWSE\001\000, I think, and you have to 
send name requests to a workgroup, don't you? 

Hmmm, a minute's checking with Ethereal shows that this is not true.

That would indeed be the easiest way to do it. I will leave it as an 
exercise for the students, unless I get around to it first.

Richard Sharpe, rsharpe at, rsharpe at, 
sharpe at,

More information about the samba-technical mailing list