libsmbclient and Windows 9X and Windows NT: Some problems.

MCCALL,DON (HP-USA,ex1) don_mccall at hp.com
Wed Feb 14 14:07:48 GMT 2001


Hi Richard,
I like your book as well; esp. for someone trying to LEARN samba, as opposed
to a reference book, like "Using Samba" (which I point people to because
it's freely available).  As for libsmbclient changes, I haven't had any
experience with that code, but it seems a shame to build a requirement into
it for nmbd to be running (and thus tie up a couple of well known ports).
For instance, there are a number of other smb server products out there,
like Advanced Server for Unix, that require these ports to run, so
appliances built on libsmbclient couldn't be ported onto these platforms.
Could you structure the change to libsmbclient so that if nmbd is NOT
running, that it 'falls back' to previous behavior, noting that this would
restrict the app to Win2k and Samba access for that case?
hope this helps,
Don

-----Original Message-----
From: Richard Sharpe [mailto:sharpe at ns.aus.com]
Sent: Wednesday, February 14, 2001 1:57 AM
To: samba-technical at us5.samba.org
Cc: mpeterson at caldera.com
Subject: libsmbclient and Windows 9X and Windows NT: Some problems.


Hi,

After doing some investigations today on libsmbclient using GetBackupList
requests to find the local master browser, I have found the following:

1. Samba and Windows 2000 are pretty infussed by what they receive, and are
happy to resond to such requests by looking at the source IP address and
port number in the datagram sent.

2. Windows NT at some service pack, and perhaps all service packs, and
Windows 9X require that:

   - The request come from port 138
   - The sender have a registered NetBIOS name.

Now, it is pretty hard to satisfy these requirements in libsmbclient, as it
is a library that will be called by non-root processes.

That being the case, I am of the opinion that the only solution is:

1. Modify nmbd to accept a tdb message SEND_GETBACKUPLIST. I will also have
to modify libsmbclient to use tdb to send the request to nmbd and retrieve
the response from the unexpected datagams queue ... or timeout trying.

This means that it will have the correct from port and there will be a
registered NetBIOS name.

2. Require that the right version of Samba be installed on the client, and
that nmbd be running.

I would try to get these changes into Samba 2.2.0 as the changes are
relatively small. One extra function for nmbd and a small change to main
for nmbd ...

Any comments?

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.ethereal.com)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba






More information about the samba-technical mailing list