libsmbclient status

Christopher R. Hertel crh at
Mon Nov 4 02:17:01 GMT 2002

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!)

Chris -)-----

Samba Team --     -)-----   Christopher R. Hertel
jCIFS Team --   -)-----   ubiqx development, uninq.
ubiqx Team --     -)-----   crh at
OnLineBook --    -)-----   crh at

More information about the samba-technical mailing list