[Samba] Environment variables in smb.conf -- inconsistent results
samba20111126a at westbrook.com
Sat Nov 26 19:01:58 MST 2011
I am trying to use environment variables in my samba configuration file.
The %$() directive does not seem to work consistently. Do I misunderstand
As a success example, "include = %$(SVCDIR)/conf/smb-shares.conf" works
fine. Logging with debuglevel = 3 indicates successful inclusion of the
However, as a failure example, "interfaces = %$(INTERFACES)" does not work
at all, and I get an error such as:
interpret_string_addr_internal: getaddrinfo failed for name %$(INTERFACES)
> [Name or service not known]
> interpret_interface: Can't find address for %$(INTERFACES)
As another failure example, pointing to a passdb backend using "passdb
backend = tdbsam:%$(SVCDIR)/conf/smbusers" fails to substitute the
environment variable similarly, to wit:
tdb(unnamed): tdb_open_ex: could not open file %$(SVCDIR)/conf/smbusers: No
> such file or directory
> Could not open tdb: No such file or directory
> tdbsam_open: Failed to open/create TDB passwd [%$(SVCDIR)/conf/smbusers]
> tdbsam_getsampwnam: failed to open %$(SVCDIR)/conf/smbusers!
What gives? Am I doing something wrong? Shouldn't %$() do a substitution
anywhere it is supplied?
PS - Running samba 3.5.11 here.
More information about the samba