Hello, Is it possible to log changes in files on a samba-server? I need to log which changes users do in shared folders to track if someone is deleting, changing or creating files. Is this possible? Regards, Frank Nørvig
On Tue, 4 Feb 2003, Frank Nørvig wrote:> Hello, > > Is it possible to log changes in files on a samba-server? > I need to log which changes users do in shared folders to track if someone > is deleting, changing or creating files. > > Is this possible?Yes. It is possible. You need to use a recent version of samba (2.2.7a is the latest) that has been built with the VFS modules enabled. You then need to install the audit.so module on the share that you want to audit. The options that control this are: vfs object = /usr/lib/samba/audit.so>From the README on this module:audit A simple module to audit file access to the syslog facility. The following operations are logged: share connect/disconnect, directory opens/create/remove, file open/close/rename/unlink/chmod. - John T. -- John H Terpstra Email: jht@samba.org
> Yes. It is possible. You need to use a recent version of samba (2.2.7a is > the latest) that has been built with the VFS modules enabled.Sounds like that would do the thing. But it is possible to make it log into anything else but syslog? My syslog is big enough already... Frank
On Wed, 5 Feb 2003, Frank Nørvig wrote:> > Yes. It is possible. You need to use a recent version of samba (2.2.7a is > > the latest) that has been built with the VFS modules enabled. > > Sounds like that would do the thing. But it is possible to make it log into > anything else but syslog? My syslog is big enough already...In your smb.conf [globals]: log file = /var/log/samba/%m Will create a separate log file for each workstation. max log size = 0 Means let it grow adinfinitum. syslog = 0 Means do not log to syslog. log level = 1 Should be verbose enough to track anything useful and keep the per workstation log from growing too rapidly. Really suggest you try your hand at reading the man page for smb.conf: man smb.conf Cheers, John T. -- John H Terpstra Email: jht@samba.org