libsmbclient and smb_opendir: problem with workgroup

Christopher R. Hertel crh at
Mon Jun 14 17:55:21 GMT 2004

On Mon, Jun 14, 2004 at 02:32:27PM -0300, Andreas wrote:
> On Mon, Jun 14, 2004 at 12:24:24PM -0500, Christopher R. Hertel wrote:
> > Notice that the NetBIOS Session Service request keeps getting resent?  
> > Something *appears* to be listening on port 139 since the TCP connection
> > was accepted.  The problem is that DUCKMAN is not accepting the Session
> > Request.
> Exactly. Could even be a firewall there, I don't know, I don't have access
> to that machine at the moment.

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.

> > My guesses, based on all of this, are:
> > 
> > 1) The DNS being out of sync with the NetBIOS namespace is your first 
> >    problem.
> Correct. I fixed this setting the correct IP in /etc/samba/lmhosts

>From the trace, it does look as though you've fixed this.

For completeness, however, I need to mention that changing lmhosts is not 
enough.  You have probably also changed the name resolution order in your 
smb.conf.  Otherwise, libsmbclient would resolve the name via the DNS 
first, and get the wrong result.

> > 2) smbd not running is your second problem.
> I also agree, or at least it has some sort of problem there.

If that's the case, then libsmbclient is doing the right things but cannot 
reach the browse master and, so, cannot obtain the list.

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.

> > These are guesses, so correct me if any of my assumptions are wrong.
> Please read my other email about the smbc_opendir() test failing when
> I'm in the MYGROUP workgroup. That's what got me into this in the first
> place.

I've read through (and commented on) that thread.

I think, however, that your are correct that something on DUCKMAN is 
configured badly, and is breaking browsing as a result.

Hope that helps.

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