libsmbclient: Browsing and a URI spec?

Welsh, Armand armand.welsh at sscims.com
Wed Jan 3 16:56:08 GMT 2001


Just to clarify, if this file doesn't exist, it makes sense to have a method
to read in smb.conf for default settings, but it shouldn't assume this
method.

Perhaps this: (in psudo bash script form for logic)

if [ -f ~/.smbc/smbc.conf ]; then
	<use local config for settings>
else if [ -f /etc/smbc.conf ]; then
	<use global config for settings>
else
	<no defaults assumed>
	<exit in error>
fi

then to expand the sameple config file, he use of a * for the value of a
variable, could mean to refer to smb.conf for the settings.

For ease of administration, a default /etc/smb.conf file could set out that
looks like this:

#/etc/smbc.conf
# Default Configuration Parmeters for libsmbclient

# Domain to Authenticate Against
# - if set, authenticate against any (*) domain controller
# - set to * to get value from /etc/smb.conf (use workgroup)
DOMAIN=*

# Default workgroup to browse
# - if not set, and domain is set, then WORKGROUP=DOMAIN
# - set to * to get value from /etc/smb.conf
WORKGROUP=*

# NetBios Name to use for Client Browsing
# - set to * to get value from /etc/smb.conf
NBTNAME=*

# Default user to Authenticate as
# - set to * to use logged in unix user name.
USER=*

# list of WINS servers, space (" ") delimited
# - set to * to get value from /etc/smb.conf
WINS=*

------------------
a * in the user config would mean to pull values from /etc/smb.conf, where
an empty value (remark out the line, or delete the line) would pull the
values from the global /etc/smbc.conf file.  This would satisfy most every
condition.  If you want to use /etc/smb.conf, then the default
/etc/smbc.conf file will work out of the box, in this way.  But if you want
per user settings, or you want libsmbclient to use different
workgroups/domains, than the global one that samba is participating in, then
you can change them, globally for the machine, or per user.

Of course, this is just my oppinion.




More information about the samba-technical mailing list