Setting up SMB home shares does not work

Bruno_MB

Cadet
Joined
Feb 21, 2023
Messages
5
I have exactly followed this tutorial extensively and many times, but I cannot get this to work. I have even tried to set the permissions to 777.
TrueNAS is joined to a Samba domain controller and I access the shares from a non-domain-joined Windows computer, where I log in with $domain\$user and password.
I can setup any share with any domain user in the ACL and it works just fine. But as soon as I mark one as home share, I cannot access it anymore. Depending on the os version and access method (NETBIOS, IP, FQDN) I get different errors like "Object not found", "Insufficient permissions" or just a general timeout.
Any help or steps to troubleshoot would be appreciated.
 

Bruno_MB

Cadet
Joined
Feb 21, 2023
Messages
5
Some more info:
The per user folders do not get created on login and another error message is "A device attached to the system is not functioning".
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Looks like the guide is wrong. Dataset should be created with Domain Users (not domain admins) as owning group. There was a bug in 22.12.0 related to permissions on auto-created datasets. Try in 22.12.1 with correct owning group.
 

Bruno_MB

Cadet
Joined
Feb 21, 2023
Messages
5
Updating literally bricked my AD integration, so I rolled back and tried this on a fresh install.
Sadly, with the newest version and a different group, it doesn't work either for me . The preset also adds Domain Users anyways.
I have also noticed that I can access the other shares on Windows 10 and 11 with local accounts, but not on Windows 11 with a Microsoft account.
 

Bruno_MB

Cadet
Joined
Feb 21, 2023
Messages
5
So I could narrow this down to TrueNAS not creating the actual file system path automatically. After creating /mnt/example-pool/example-dataset/EXAMPLE-DOMAIN and subsquently /mnt/example-pool/example-dataset/EXAMPLE-DOMAIN/example-username manually, it works.
I have tried setting this path as home share on my domain controller, only creating the example-domain subfolder, but I get the following errors nevertheless:
Code:
../../source3/modules/vfs_zfs_core.c:451(create_zfs_connectpath)
  create_zfs_connectpath: preparing to create: /mnt/example-pool/example-dataset/EXAMPLE-DOMAIN/example-username
cannot create '/mnt/example-pool/example-dataset/EXAMPLE-DOMAIN/example-username': parent does not exist
../../source3/modules/smb_libzfs.c:795(create_dataset_internal)
  create_dataset_internal: Failed to create dataset [example-pool/example-dataset/EXAMPLE-DOMAIN/example-username]: No such file or directory
../../source3/smbd/smb2_service.c:669(make_connection_snum)
  make_connection_snum: SMB_VFS_CONNECT for service 'example-username' at '/mnt/example-pool/example-dataset/EXAMPLE-DOMAIN/example-username' failed: No such file or directory

and
Code:
../../source3/modules/vfs_ixnas.c:461(path_get_aclbrand)
  path_get_aclbrand: /mnt/example-pool/example-dataset/EXAMPLE-DOMAIN/example-username: getxattr() for system.posix_acl_access failed: No such file or directory
../../source3/modules/vfs_ixnas.c:1529(set_acl_parameters)
  set_acl_parameters: Connectpath does not support NFSv4 ACLs. Disabling ZFS ACL handling.
../../source3/smbd/smb2_service.c:808(make_connection_snum)
  make_connection_snum: canonicalize_connect_path failed for service example-username, path /mnt/example-pool/example-dataset/EXAMPLE-DOMAIN/example-username

I surely can't be the only one with this problem. I assume I'm doing something wrong because it's too trivial. Any help would be highly appreciated.
 
Last edited:

Bruno_MB

Cadet
Joined
Feb 21, 2023
Messages
5
Adding "zfs_core:zfs_auto_create = true" to the SMB share's "Auxiliary Parameters" finally does the job.
Looking at the source code, this option is included in the "Multi-user time machine" and "Private SMB Datasets and Shares" presets.
Why is this mentioned nowhere?
The documentation even says to select "No presets". What the hell?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Adding "zfs_core:zfs_auto_create = true" to the SMB share's "Auxiliary Parameters" finally does the job.
Looking at the source code, this option is included in the "Multi-user time machine" and "Private SMB Datasets and Shares" presets.
Why is this mentioned nowhere?
The documentation even says to select "No presets". What the hell?
pam makehomedir is supposed to auto-generate the homedir. I'll take a look at it probably this next week and see what's going on.
 
Top