我有桑巴服务器。我已经这样配置 smb.conf:
[global]
# Another configuration
#
#
# Audit Activity Settings
full_audit:prefix = %u|%I|%m|%S
full_audit:success = mkdir rename unlink rmdir pwrite pread
full_audit:failure = none
full_audit:facility = local7
full_audit:priority = NOTICE
[shared]
comment = Shared Content
path = /data/shared
read only = no
browsable = yes
vfs objects = full_audit
Run Code Online (Sandbox Code Playgroud)
我想将 samba 日志扔到特定文件,例如/var/log/samba/log.audit. 我在 rsyslog.conf 中进行了这样的配置:
if $syslogfacility-text == 'local7' and $programname == 'smbd' then /var/log/samba/log.audit
Run Code Online (Sandbox Code Playgroud)
但没有任何反应,没有文件日志 log.audit at /var/log/samba/。
我也尝试过/etc/rsyslog.d/50-default.conf这样配置:
local7.* /var/log/samba/log.audit
Run Code Online (Sandbox Code Playgroud)
但同样,没有文件 …