Samba: non-standard logs location

I have samba installed and working, but i need to change the location of samba logs
from default /var/log/samba4/ to /var/log/, so i did change log file to my own path:
log file = /var/log/smb.%m
After restart (testparm did not complain) samba created expected files in /var/log/:
smb.
smb.nmbd
smb.smbd
smb.winbindd
but also created a lot of files in /var/log/samba4/ which should not to be used according to log file directive.
Files in /var/log/samba4/:
log.nmbd
log.rpcd_classic
log.rpcd_epmapper
log.rpcd_fsrvp
log.rpcd_lsad
log.rpcd_mdssvc
log.rpcd_rpcecho
log.rpcd_spoolss
log.rpcd_winreg
log.samba-dcerpcd
log.smbd
log.winbindd
After changing log file directive (and restart) i think there should be no usage of /var/log/samba4/.
Removing /var/log/samba4/ folder makes samba complains in logs there is no file and cannot create new one...

How to change all log file location to /var/log/?
 
I do not use Samba, but I would attempt fooling it with a symbolic link(1) (unless you don’t want samba4 to exist at all):​
Bash:
cd /var/log
rm      samba4/*
rmdir   samba4
ln -s . samba4
Yet I guess you don’t want these log.* files being created either, do you? If anything they should be named smb.log.*.​
 
Back
Top