How to view the effective smb.conf when using mixed registry config

Christof Schmitt cs at samba.org
Thu Dec 8 16:06:20 UTC 2016


On Wed, Dec 07, 2016 at 07:12:59PM -0600, Steve French wrote:
>    On Wed, Dec 7, 2016 at 5:33 PM, Christof Schmitt <cs at samba.org> wrote:
> 
>      On Wed, Dec 07, 2016 at 05:12:45PM -0600, Steve French wrote:
>      > It is a little confusing trying to figure out the "real" values that
>      will
>      > be loaded by smbd (or any Samba utilities) since when
>      "include=registry" is
>      > used (or even when include of a text file from smb.conf is used), the
>      > "real" values are presumably
>      >
>      > 1) everything in smb.conf upto the include line, unless the registry
>      (net
>      > conf) overwrites the same keyword (in which case that line is a no op)
>      > 2) everything from the registry ("net conf")
>      > 3) everything after the "include" line in smb.conf
>      >
>      > Is there a tool that dumps the "real" Samba configuration values - ie
>      what
>      > the final configuration looks like?
> 
>      testparm?
>      Christof
> 
>    Turns out that testparm sort of works, but is strange.
>    I just did a "net conf setparm global workgroup WORKGROUP""
>    and then testparm which doesn't display workgroup but if I do instead
> 
>    net conf setparm global "server string" "a Samba 4.5 server"
> 
>    then testparm does show it.  Weird that various parms are not listed
>    (leases and workgroup)

I think this is expected. By default, testparm only prints parameters
that are not the same as the default setting. Explicitly setting a
parameter to the same as the default does not change this. Running
testparm -v prints all parameters.

Christof



More information about the samba-technical mailing list