I am currently trying to share my ZFS dataset using SMB. Unfortunately I receive the error NT_STATUS_BAD_NETWORK_NAME every time I try to connect to the share. The error does not make much sense to me since as far as I understood it from this source https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-cifs/8f11e0f3-d545-46cc-97e6-f00569e3e1bc the error NT_STATUS_BAD_NETWORK_NAME is about an invalid server name. But if so, how can it be that I can flawlessly access the normal share but not the ZFS share. Shouldn't this error occur for both shares?
I also looked in to this post What does NT_STATUS_BAD_NETWORK_NAME mean in Samba? suggesting that the permissions might be set incorrectly. But I dont think that this is the cause of the problem since the permissions for both the /mnt/share as well as the /basis/media directory are set to be 755.
Maybe this error is about the configuration of the ZFS dataset or some hidden ZFS configuration that does not allow SMB to share the ZFS file system?
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
unix password sync = yes
passwd program = /usr/bin/passwd %u
# normal SMB share
[test]
path = /mnt/share
writable = yes
browseable = yes
read only = no
valid users = @media
public = no
guest ok = no
# ZFS SMB share
[zfs]
path = /basis/media
writable = yes
browseable = yes
read only = no
valid users = @media
public = no
guest ok = no
I am trying to access the share via smbclient //localhost/zfs -U <USER>%<PWD>. No matter how I am trying to access the share, either locally or from another machine, the error persists.
Edit: Part of the log file that is suspected to be related to the error
[2023/05/20 14:49:02.615284, 0] ../../source3/smbd/smb2_service.c:787(make_connection_snum)
make_connection_snum: canonicalize_connect_path failed for service zfs, path /basis/media
[2023/05/20 14:49:02.615366, 3] ../../source3/smbd/smb2_server.c:3961(smbd_smb2_request_error_ex)
smbd_smb2_request_error_ex: smbd_smb2_request_error_ex: idx[1] status[NT_STATUS_BAD_NETWORK_NAME] || at ../../source3/smbd/smb2_tcon.c:151