Auxiliary parameters barring connection

IBCMED

Dabbler
Joined
May 18, 2022
Messages
33
Good morning/good afternoon/evening my friends! I'm using these parameters in samba:

vfs objects = audit
vfs_audit:prefix = %U%P%S%T%I
vfs objects = audit:success = all
vfs objects = audit:failure = all

I have now verified that they are blocking the connection of windows machines, causing them not to find TrueNAS. Could you tell me why this is happening? Thanks in advance and have a good week everyone!
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
You're confusing vfs_audit and vfs_full_audit parameters. vfs_audit doesn't have a parameter named vfs_audit:prefix. You should have these auxiliary parameters to achieve what you want:

Code:
vfs objects = full_audit
full_audit:prefix = %U|%P|%S|%T|%I
full_audit:success = all
full_audit:failure = all


Also, are you setting these as global auxiliary parameters, or in the share auxiliary parameters?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Both of those examples are potentially going to break shares. Samba only interprets a single "vfs objects" line per share. So you're removing options for ACL handling, streams, shadow copies, etc. Look at existing vfs objects, copy them with "full_audit" prepended. Note that Samba's VFS changes from release to release and so any auxiliary parameters related to auditing may break on major version upgrade.

In general, auxiliary parameters are unsupported. So first step in bug tickets where they are set is to tell user to reproduce without them enabled.
 

IBCMED

Dabbler
Joined
May 18, 2022
Messages
33
You're confusing vfs_audit and vfs_full_audit parameters. vfs_audit doesn't have a parameter named vfs_audit:prefix. You should have these auxiliary parameters to achieve what you want:

Code:
vfs objects = full_audit
full_audit:prefix = %U|%P|%S|%T|%I
full_audit:success = all
full_audit:failure = all


Also, are you setting these as global auxiliary parameters, or in the share auxiliary parameters?
Okay, I understand and I've modified it. I'm configuring these parameters only in the service, should I do it differently?
 

IBCMED

Dabbler
Joined
May 18, 2022
Messages
33
Both of those examples are potentially going to break shares. Samba only interprets a single "vfs objects" line per share. So you're removing options for ACL handling, streams, shadow copies, etc. Look at existing vfs objects, copy them with "full_audit" prepended. Note that Samba's VFS changes from release to release and so any auxiliary parameters related to auditing may break on major version upgrade.

In general, auxiliary parameters are unsupported. So first step in bug tickets where they are set is to tell user to reproduce without them enabled.

My goal is to monitor all actions of TrueNAS users, what parameters should I use in samba then?
 

Montttiii

Dabbler
Joined
Oct 26, 2020
Messages
11
Hi everyone, I have it configured as follows:
*In the global I have it like this:
1669771539611.png

*in the share auxiliary parameters, I have it like this:
1669771744962.png


*and when checking the logs, they show me this way:
1669771998559.png


Just by entering the share and creating a new folder, it shows me a lot of unnecessary data. And I don't know what line it would be when I create or delete a file.
 
Joined
Jul 3, 2015
Messages
926
Try this:

Code:
full_audit:prefix=%u|%I|%m|%S
full_audit:priority=notice
full_audit:failure=connect
full_audit:success=openat mkdirat renameat unlinkat


It seems like you are using older naming for your vfs operations like 'mkdir' which is now 'mkdirat' etc. It also appears that if you enter one wrong operation in your line you will get EVERYTHING hence why you are being bombarded with information.
 
Last edited:

Montttiii

Dabbler
Joined
Oct 26, 2020
Messages
11
Try this:

Code:
full_audit:prefix=%u|%I|%m|%S
full_audit:priority=notice
full_audit:failure=connect
full_audit:success=openat mkdirat renameat unlinkat


It seems like you are using older naming for your vfs operations like 'mkdir' which is now 'mkdirat' etc. It also appears that if you enter one wrong operation in your line you will get EVERYTHING hence why you are being bombarded with information.

Thank you very much, now it is much better in TrueNAS-SCALE-22.02.4

1670182014330.png
 

Montttiii

Dabbler
Joined
Oct 26, 2020
Messages
11
Now when doing the same configuration in Truenas core TrueNAS-13.0-U3.1, it shows me the following error. I tried to do my best but no success.
I need your help please.

1670182564661.png
 
Joined
Jul 3, 2015
Messages
926
Are you sure you've got that the right way around? My config is for TrueNAS Core 13.0-U3.1 and is working fine. However I can't speak for TrueNAS SCALE.
 

Montttiii

Dabbler
Joined
Oct 26, 2020
Messages
11
Are you sure you've got that the right way around? My config is for TrueNAS Core 13.0-U3.1 and is working fine. However I can't speak for TrueNAS SCALE.
Hello, I only have this problem with TrueNAS-13.0-U3.1, could you give me your configuration to make the comparisons?

Thank you very much for answering.
 
Joined
Jul 3, 2015
Messages
926
Share

vfs objects=shadow_copy_zfs full_audit zfs_space zfsacl streams_xattr zfs_core ixnas

Global

full_audit:prefix=%u|%I|%m|%S
full_audit:priority=notice
full_audit:failure=connect
full_audit:success=openat mkdirat renameat unlinkat
 

Montttiii

Dabbler
Joined
Oct 26, 2020
Messages
11
Share

vfs objects=shadow_copy_zfs full_audit zfs_space zfsacl streams_xattr zfs_core ixnas

Global

full_audit:prefix=%u|%I|%m|%S
full_audit:priority=notice
full_audit:failure=connect
full_audit:success=openat mkdirat renameat unlinkat
Thank you very much, now everything is fine.
 
Top