libsmbclient and smb_opendir: problem with workgroup

Christopher R. Hertel crh at
Mon Jun 14 19:35:26 GMT 2004

On Mon, Jun 14, 2004 at 03:06:15PM -0300, Andreas wrote:
> On Mon, Jun 14, 2004 at 12:55:21PM -0500, Christopher R. Hertel wrote:
: :
> > If you cannot get to the Session Service on that machine then browsing 
> > will not work.  You really must disable the browse service on that server 
> > and let some other system act as the browse server.
> This affects browsing of the whole network? Including other groups?


The problem is that MYGROUP is your default workgroup (per the settings in 
your smb.conf file on the client).  When you query for "smb://", the query 
is sent--by default--to MYGROUP<1D>.

When you send to something that doesn't exist, or to a different
workgroup, you bypass the problem by going to a working browser.

Basically, it's just that one workgroup that's broken, and it's only 
broken because of that one server, which is becoming the LMB even though 
it's being prevented from sharing the browse list.

> > If that's the case, then libsmbclient is doing the right things but cannot 
> > reach the browse master and, so, cannot obtain the list.
> What about the other workgroups?

Change the default workgroup on the client and see what happens.  They 
should work (unless they are similarly broken).

> > Though I agree with many of Derrell's points, the problem in this case is 
> > that libsmbclient is finding the correct system but that system is 
> > refusing to do its job (firewall, whatever) and is not providing the 
> > browse list when asked.
> So, duckman is the one which is advertising on having a list of all machines
> in the network, including those from other workgroups, is that it? 

No.  DUCKMAN is advertising having a list of machines in the MYGROUP 
workgroup.  DUCKMAN *also* has a list of all known workgroups in the area.  

The smb:// form is supposed to collect the list of workgroups.  The 
libsmbclient code tries to get that list from the *default* workgroup (as 
configured in smb.conf).  Since MYGROUP is the default workgroup and 
DUCKMAN is the LMB for that workgroup, the smb:// query is failing.

Make sense?

If you change your workgroup to one that works, you should get the full 

> I'm a little
> rusty in my knowledge of windows browsing, I suppose there is a role exactly
> like this, to maintain a list of all machines in all workgroups. If yes, what
> a bad coincidence this is duckman's role :)

Not a coincidence.  It's configurable via the smb.conf file on DUCKMAN.  
Just set 'local master = no' and 'domain master = no'.

...or fix whatever it is that's preventing duckman from responding to the 
Session Request messages.

NOTE:  All of this assumes that you're on the same subnet (which seems to 
       be the case, based on the traces).  I haven't said anything about 
       what happens across multiple subnets (which is even worse).  :)

Shameless plug:  You can read all about the Browse Service at


Chris -)-----

"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
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