小编spn*_*spn的帖子

使用 Full_Audit 监控 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
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)

但同样,没有文件 …

logging samba

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

logging ×1

samba ×1