NetBSDでSamba Serverを建てるのが目的だが、取り敢えず、CentOSで試したのでその記録。 あとで、何とかNetBSDにも…でも、いまいち気合が入らない。
まぁ、実質、yumでinstallするか、pkgsrcでinstallするかくらいしか違わないと思うけど。
取り敢えず、ファイルをopenしたり、addしたりwriteしたりした場合に全て記録が出るようにしてみた。
[global]
dos charset = CP932
display charset = UTF-8
server string = Samba Server Version %v
log level = 1
debug prefix timestamp = Yes
debug hires timestamp = No
debug uid = Yes
enable core files = No
cups options = raw
hide special files = Yes
hide unreadable = Yes
printing = bsd
[security]
comment = security
path = /samba/security
valid users = user1,user2,user3
read list = user1,user2,user3
write list = user1,user2
read only = No
vfs objects = full_audit ←VFSの動作全てを記録する
full_audit:failure = open pyrite unlink ←失敗の記録
full_audit:success = open pyrite unlink ←成功の記録
create mask = 0777
directory mask = 0777
# ### end of the forwarding rule ### user.* -/var/log/samba/audit.log
CentOSで配布されるSambaは、DefaultでCUPSがLinkされている。 ソースコード上の問題で、/etc/samba/smb.conf内のprinting = cupsをprinting = bsdに差し替えないと、 CUPSに繋がらないというエラーが出る(daemonは起動するし正常に動作するが、logがうるさい)ので注意