smbd
and nmbd
services log a lot of things as errors which clutters my journald logs when I filter it with journalctl -p 3
. Is there a way to tell samba to not log start/stop/daemon_ready
messages as errors (log level 3) but as normal messages instead (log level 5/6/7)?
For example:
[2021/03/21 22:43:35.215757, 0] ../../lib/util/become_daemon.c:135(daemon_ready)
daemon_ready: daemon 'nmbd' finished starting up and ready to serve connections
[2021/03/21 22:43:35.261318, 0] ../../lib/util/become_daemon.c:135(daemon_ready)
daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/03/21 22:43:47.678429, 0] ../../source3/nmbd/nmbd.c:60(terminate)
Got SIGTERM: going down...
[2021/03/21 22:43:47.707379, 0] ../../lib/util/become_daemon.c:135(daemon_ready)
daemon_ready: daemon 'nmbd' finished starting up and ready to serve connections
[2021/03/21 22:43:47.751871, 0] ../../lib/util/become_daemon.c:135(daemon_ready)
daemon_ready: daemon 'smbd' finished starting up and ready to serve connections
[2021/03/21 22:44:10.782143, 0] ../../source3/nmbd/nmbd_become_lmb.c:398(become_local_master_stage2)
*****
Samba name server IVAILOPC-LIN is now a local master browser for workgroup WORKGROUP on subnet 192.168.0.101
*****
These are obviously not errors and just clutter my log when I try to look for errors.
This is the relevant part of my config
log file = /var/log/samba/log.%m
You could add this to the [global] section of your
smb.conf
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#SYSLOG