(Trying to summarise the thread..)
Another thing that is odd.
Freenas as Domain Controller. You have specify in Service -> CIFS -> Auxiliary parameters:
store dos attribute = no and
ea support = no.
The /usr/local/smb4.conf
Code:
[global]
server max protocol = SMB2
.....
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
....
store dos attributes = no
ea support = no
....
[data]
path = /mnt/Vol_1/data
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
....
will "compile" with
testparm to both of them = Yes. A bit controversial ... I thought the last cfg should be the valid one. And it will also add vfs objects = dfs_samba4, acl_xattr in the global section even it's
not in smb4.conf.
Nerveless I have decided to go with the guide line to not have Domain Controller and AD member on the same server. I will deal with jail and DC in the future.
For those who insist with having DC and AD member on the same server instance you can set the parameter = no on every share you wish to have faster folder browsing (
Sharing -> Windows (CIFS) -> yourshare -> Advanced Mode -> Auxiliary parameters)
But is not recommended.
If you only make freenas to be a AD member. You can add in
Service -> CIFS -> Auxiliary parameters: store dos attribute = no and
ea support = no.
Your /usr/local/etc/smb4.conf will then look like
Code:
[global]
....
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
....
server role = member server
netbios name = THOR
....
log level = 1
store dos attributes = no
ea support = no
[data]
path = /mnt/Vol_1/data
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
vfs objects = zfs_space zfsacl aio_pthread streams_xattr
...
And will compile with testparm to ...
Code:
[global]
....
server string = FreeNAS Server
server role = member server
security = ADS
allow trusted domains = No
....
[data]
path = /mnt/Vol_1/data
read only = No
guest ok = Yes
veto files = /.snapshot/.windows/.mac/.zfs/
vfs objects = zfs_space, zfsacl, aio_pthread, streams_xattr
zfsacl:acesort = dontcare
nfs4:chown = true
nfs4:acedup = merge
nfs4:mode = special
Testparm will not add the vfs object = acl_xattr and also make the last cfg valid.
As the default value for store dos attribute and ae support = no they will not be shown.
You will then have fast folder browsing but will not be able to set those DOS bits (read only/hidden/archive)
more in depth is explained in this thread
https://forums.freenas.org/index.ph...-to-improve-samba-browsing-performance.24906/