Some samba tools ignore include local.conf
Problem
If the file /etc/samba/local.conf exists at the time when the /etc/samba/smb.conf gets committed via ucr, it gets included via include local.conf. Tools like samba-tool testparm and testparm -sv show all parameters configured there. Yet, there are some samba tools and components that only consider the [global] section and ignore all include statements found in other sections. Since the base.conf usually has some non-global sections, the include local.conf may also get ignored by those tools.
Solution
This doesn’t seem to affect the main components like samba and smbd.
Since the local.conf is usually only used in support/debugging situations, temporary modifications of [global] parameters can also be done in the main smb.conf. Univention reported this behavior to the upstream project and proposed a patch via Gitlab but no final solution has been reached yet. If this is blocking you in a major way, we would be happy to learn about your use case. Workarounds other than patching Samba are conceivable, like prefixing each include statement by [global], but that’s not particularly attractive.
Details
Reads only global:
- /usr/libexec/samba/samba-dcerpcd
- /usr/libexec/samba/rpcd_epmapper
- /usr/libexec/samba/rpcd_fsrvp
- /usr/libexec/samba/rpcd_lsad
- /usr/libexec/samba/rpcd_witness
- /usr/bin/dbwrap_tool
- /usr/bin/net
- /usr/bin/nmblookup
- /usr/bin/smbpasswd
- /usr/bin/wspsearch
- /usr/bin/mdsearch
- /usr/bin/rpcclient
- /usr/bin/smbcacls
- /usr/bin/smbclient
- /usr/bin/smbcquotas
- /usr/bin/smbget
- /usr/bin/smbtree
- /usr/sbin/winbindd
- /usr/sbin/nmbd
- /usr/bin/pdbedit
- /usr/bin/profiles
- /usr/bin/smbcontrol
- /usr/bin/smbstatus
Reads also other inludes:
- /usr/bin/testparm
- /usr/bin/samba-tool testparm
- /usr/libexec/samba/rpcd_classic
- /usr/libexec/samba/rpcd_mdssvc
- /usr/libexec/samba/rpcd_spoolss
- /usr/libexec/samba/rpcd_winreg
- /usr/bin/cifsdd
- /usr/sbin/smbd
- /usr/sbin/samba
- /usr/bin/sharesec
- /usr/sbin/samba-gpupdate
- /usr/sbin/samba_dnsupdate
- /usr/sbin/samba_spnupdate
- /usr/sbin/samba_upgradedns