logging SMB connections

Status
Not open for further replies.

Luke Jaeger

Dabbler
Joined
Mar 16, 2016
Messages
43
Is there an easy way to log SMB connections on FreeNAS 11? I would like to see who is logging in and out, and when. Need to see user name, timestamp, and client IP / host. Basically, the info you'd get from smbstatus, but dumped to a log file.

Thanks!
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
vfs_audit is no longer needed to do this in Samba 4.7 (FN 11.1 ). Under services->SMB add the following aux parameter log level = 1 auth_audit:3
Maybe include that in the documentation? ;)
 

Luke Jaeger

Dabbler
Joined
Mar 16, 2016
Messages
43
vfs_audit is no longer needed to do this in Samba 4.7 (FN 11.1 ). Under services->SMB add the following aux parameter log level = 1 auth_audit:3
vfs_audit is no longer needed to do this in Samba 4.7 (FN 11.1 ). Under services->SMB add the following aux parameter log level = 1 auth_audit:3

Is there an advantage to doing it this way rather than vfs_audit?
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Is there an advantage to doing it this way rather than vfs_audit?
I can't see an advantage, other than not having to load another vfs object.

From what I can make out from the (somewhat lacking) documentation of this feature, it will only log successful and failed authentication & authorization attempts. While the VFS audit object will also log things like file creation, deletion, etc.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I can't see an advantage, other than not having to load another vfs object.

From what I can make out from the (somewhat lacking) documentation of this feature, it will only log successful and failed authentication & authorization attempts. While the VFS audit object will also log things like file creation, deletion, etc.

Right. Avoiding layering VFS objects can be useful. JSON support is nice as well.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I can't see an advantage, other than not having to load another vfs object.

From what I can make out from the (somewhat lacking) documentation of this feature, it will only log successful and failed authentication & authorization attempts. While the VFS audit object will also log things like file creation, deletion, etc.

You can also adjust log levels on the fly through smbcontrol. I'm looking forward to seeing more 4.7 in production because this feature can potentially make it easier to debug auth problems.
 
Status
Not open for further replies.
Top