libsmbclient and a configuration file ...

Richard Sharpe sharpe at
Mon Jan 8 05:11:25 GMT 2001


While I have implemented an smb.conf file in libsmbclient so far, and was
thinking of extending what I have implemented (read $HOME/.smb/smb.conf), a
valid suggestion was made by David Lee.

My thoughts were to implement:

  1. Read $HOME/.smb/smb.conf if that exists
  2. Else read SAMBA smb.conf file if that exists
  3. Allow applications to supply their own callbacks for parameters.

David's suggestion was that with a large user community, it would be better
to check for the existence of a central, system controlled config file
first, and then to check for the user's own version.

There is also reason to suggest that if Samba is running on the system that
libsmbclient is being used on, its config file might not be of interest to
users of libsmbclient.

So, perhaps the config file order should be:

  1. Read system wide confiug file, if it exists [1]
  2. Else read $HOME/.smb/smb.conf if it exists
  3. Should applications be able to override at all?

[1] What the system wide config file should be presents some problems,
because on many Linux-based systems, /etc/smb.conf will exist if Samba is
running on the machine.

Suggestions and discussion appreciated.

Richard Sharpe, sharpe at
Samba (Team member,, Ethereal (Team member,
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba

More information about the samba-technical mailing list