libsmbclient: Browsing and a URI spec?

Richard Sharpe sharpe at ns.aus.com
Thu Jan 4 22:50:20 GMT 2001


At 03:25 PM 1/4/01 -0600, Christopher R. Hertel wrote:
>> Here is the issue.  If you look at the URI formats suggested, you'll
>> notice that "workgroup" and "domain" (in this context) are two potentially
>> different, optional parameters:
>>   smb://[workgroup]/
>>   smb://[[[domain;]user[:password]@]server[:port]][/share[/path[/file]]]
>
>Quick asside.  Richard pointed out that server ennumeration is done via an
>SMB connection as is share ennumeration.  We just connect to (potentially)
>different servers for the different lists.

As an aside, my description back then was a bit wrong. This was because of
a bug in Ethereal (now fixed). To enumerate the workgroups/domains, you
send a NetServerEnum request with a type of 0x80000000, which is defined as
list domains.

>Thus, the complete syntax is:
>
>  smb://[[[domain;]user[:password]@]server[:port]/[share/[path/][file]]]
>
>where server could be a workgroup/ntdomain name or a server name.
>
>If share/ is present, then server is not interpreted as a workgroup name.
>If share/ is *not* present, then the name is tried as a workgroup name 
>and as a server name.  (If both are valid names, then we have detected 
>one of those badly configured networks.)

This is how I have implemented it, so far ...

>> I get the feeling that there is demand for a library-wide configuration
>> of some sort of all optional parameters.  Therefore, you need to have a
>> way to set _both_ of these things.
>
>Right.  I don't know about 'demand', but the idea is being discussed.
>The parameter "WORKGROUP" is already supported by Samba, so a client 
>would only need one more parameter to override workgroup and set a 
>default auth domain.
>
>> Now, there has also been mention of inheriting smb.conf parameters,
>> assuming this machine is not only a client, but also a server.  Great,
>> but smb.conf only has "workgroup", and as far as I can tell, that is
>> all it needs. 
>
>I think so too.
>
>> The solution is simple.  One or the other of these must
>> be "workgroup" in order to inherit smb.conf's settings and not totally
>> confuse admins.  The other should be called something else, hopefully
>> something more specific in meaning.
>
>AUTH[ENTICATION] DOMAIN was suggested.
>
>> The question is, "If an SMB client inherited the same machine's server's
>> "workgroup" parameter, what should it mean to the client?"  Does it mean
>> that the client should by default send "workgroup\user" as auth info
>> or does it mean the client should default browse to "workgroup"?  If
>> those are the same thing, no problem, but in the case where they are not,
>> what does "workgroup" in smb.conf mean?
>
>If we are using smb.conf, then WORKGROUP means both *unless* the AUTH 
>DOMAIN parameter is also specified.
>
>Again, I have no idea--off hand--what Samba would do with such a 
>parameter.  It could ignore it, I suppose.
>
>I looked at the PASSWORD SERVER parameter, but it is possible that using
>this parameter would cause conflicts between server config and client
>config. 
>
>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
>
>
>

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






More information about the samba-technical mailing list