我的smb.conf有:
日志文件= /var/ log /samba/log.%m
但是,每台机器的日志都是空的:
-rw-r--r-- 1 root root 0 nov 19 12:22 log.192.168.70.2
然而,samba共享它是很好的。
为什么每台机器的日志都不能工作?
版本: Centos 7上的samba-4.1.12-24.el7_1.x86_64
发布于 2018-08-03 12:17:51
您必须为要记录的共享启用一个模块(vfs对象),您需要将其添加到smb.conf文件中。
[yourshare]
...
vfs objects = full_audit
...您必须在配置文件中添加的另一项内容是全局部分:
[global]
...
# Audit settings
full_audit:prefix = %u|%I|%m|%S
full_audit:failure = all; You can filter the requests.
full_audit:success = all;
full_audit:facility = local5
full_audit:priority = notice
...接下来,您必须设置rsyslog,有关更多信息,我将您重定向到下面的链接。
发布于 2016-02-23 10:11:53
在samba中,要捕获日志,应该使用samba审核。请参考http://vmassuchetto.github.io/2013/12/10/samba-full_-ubuntu-1204/。我对samba3和samba4都进行了测试。
https://serverfault.com/questions/737621
复制相似问题