【发布时间】:2019-03-20 02:52:35
【问题描述】:
我有 samba 服务器。我已经像这样配置了 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
我想将 samba 日志发送到特定文件,例如 /var/log/samba/log.audit。我在 rsyslog.conf 中这样配置:
if $syslogfacility-text == 'local7' and $programname == 'smbd' then /var/log/samba/log.audit
但什么也没发生,/var/log/samba/ 处没有文件日志 log.audit。
我也曾尝试在/etc/rsyslog.d/50-default.conf 上进行这样的配置:
local7.* /var/log/samba/log.audit
但同样,log.audit/var/log/samba/ 没有文件日志。
但是,系统日志中提供了 Full_Audit 日志:
Mar 20 02:49:26 media-arsip smbd_audit: content|192.168.84.69|ubspok18|shared|mkdir|ok|sharedcontent/ok/tes
如何将 syslog samba full_audit 日志发送到 /var/log/samba/log.audit ?
【问题讨论】: