[Samba] Variable substitution in config file

Riaan Aspeling riaan at aspeling.co.za
Thu May 26 01:08:33 MDT 2011

Hi all,

Using the variable substitution method %$var for the parameter workgroup 
in the smb.conf file (global section) does not work for Samba 3.5.8. The 
following settings do not work:

(...Some startup script...)
     export myworkgroup = "WORKGROUP2"
     smbd --daemon --configfile=/etc/samba/smb.conf
     nmbd --daemon --configfile=/etc/samba/smb.conf

Then in the /etc/samba/smb.conf having the following settings:

   server string = My Test Server (%i)
   workgroup = %$myworkgroup
   netbios name = testserver

The servers workgroup after startup is "%$myworkgroup" without the 
quotes. If someone can point me my mistake it will be appreciated.

Kind regards

More information about the samba mailing list