My typical procedure for configuring Samba is with a config file named /etc/samba/smb.conf.master. After configuration, I implement the changes with testparm -s /etc/samba/smb.conf.master > /etc/samba/smb.conf
. But what I've found is that any setting of log level = [0..10]
in /etc/samba/smb.conf.master is ignored and not output to /etc/samba/smb.conf. This doesn't mean the log files are completely empty. Instead, they are very bare minimum with just errors and warnings, as if the setting is default: log level = 1
.
I've even tried setting the log level with the -d
debug level option using testparm
as follows. But this has no affect. The log level setting is still not passed to /etc/samba/smb.conf.
testparm -s -d 3 /etc/samba/smb.conf.master > /etc/samba/smb.conf
All this being said, my current solution is to directly edit /etc/samba/smb.conf after-the-fact and add my log level setting with log level = [0..10]
. Subsequently, the level of logging is set as intended and reflected in the log files correctly.
With some research, the answer to this Stack Exchange question, Unable to modify log level in samba, says that you cannot use testparm to test this because it forces the log level to 2.
Is this is intended behavior? If so, why? And is there a better workflow so that I don't have to edit both files?
Ubuntu 22.04 LTS Server
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Samba Version:
$ smbd -V
Version 4.15.13-Ubuntu