Directory listing in libsmbclient.so

Christopher R. Hertel crh at nts.umn.edu
Fri Dec 29 17:50:11 GMT 2000


> ...furthermore this would let us add a way to specify the scope
> 
> nmb://name/scope

Two problems with the above...

1) The syntax is wrong.  Technically, the NetBIOS name NEKO#00 with the 
   scope CAT.ORG should be represented as:

   EOGFGLGPCACACACACACACACACACACAAA.CAT.ORG

   to be RFC compliant.  That's ugly, so most people use:

   NEKO.CAT.ORG

   In either case, under NBT the scope is technically *part of the name*.

2) When *locating* a share, the scope would need to be used.  For example,

   smb://neko.cat.org/share/path/catnip.gz

   would first require a NetBIOS Name Service lookup on the name NEKO
   within the scope CAT.ORG.  Other machines may also use the name NEKO 
   as long as they are in a different scope.  Thus,

   smb://neko/share/path/catnip.gz

   represents a different file on a different server.

   Note, however, that there is an implementation bug in most (all?) 
   Microsoft implementations.  When doing the acctual Session Service 
   SESSION SETUP, you must leave the scope *out* of the called name.  My 
   read of the RFCs makes me think that MS got this wrong, but it is
   sufficiently ambiguous that I don't blame them.  In any case, the name 
   resolution (with scope) is done *before* the SESSION SETUP, so you
   still wind up talking to the right machine.

...and yes, those names all look like DNS names rather than NetBIOS names. 
This is a problem inherent in the implementations of NBT.  The RFCs
attempted to map the NBT naming system onto the DNS namespace, but due to
the ugliness of the resultant names (EOGFGLGPCACACACACACACACACACACAAA--
ick!), the fact that MS implemented Scope such that only *one* could be
chosen per workstation, and the subsequent mangled attempts to force a
flat namespace into a hierarchical one, we are stuck.  The common solution
is to try the name as a NetBIOS name first, and as a DNS name second. 

Now you know why W2K tries to separate SMB from NetBIOS.

Chris -)-----

-- 
Christopher R. Hertel -)-----                   University of Minnesota
crh at nts.umn.edu              Networking and Telecommunications Services

    Ideals are like stars; you will not succeed in touching them
    with your hands...you choose them as your guides, and following
    them you will reach your destiny.  --Carl Schultz





More information about the samba-technical mailing list