YunoHost-Apps / samba_ynh

Samba package for YunoHost
GNU Affero General Public License v3.0
1 stars 6 forks source link

dfs_samba4 parameter value in share configuration makes it inaccessible #9

Open floot opened 1 year ago

floot commented 1 year ago

Describe the bug

The configuration for the default share makes it inaccessible from SMB clients.

Context

Steps to reproduce

Expected behavior

smbclient connects to the share by displaying this prompt:

smb: \>

Actual behavior

smbclient displays this error message then exits: tree connect failed: NT_STATUS_UNSUCCESSFUL.

Logs

In Samba logs (/var/log/samba/log.<client_hostname>), there is this kind of lines for each smbclient call:

[2023/01/27 16:54:29.094613,  0] ../../source3/modules/vfs_dfs_samba4.c:83(dfs_samba4_connect)

Here is a copy of my /etc/samba/smb.conf.d/share.conf file:

[share]
   comment = share
   read only = no
   path = /home/yunohost.app/samba/share
   guest ok = no
   browsable = yes
   valid users = @samba.share
   create mask = 0660
   directory mask = 770
   vfs objects = dfs_samba4 acl_xattr recycle
   recycle:repository = .recycle
   recycle:keeptree = yes
   recycle:versions = yes

My understanding

I think the dfs_samba4 value in the vfs objects parameter is the source of the issue. From what I understood from DFS stuff in Samba, this should only apply to AD DC Samba setups, which is apparently not the case for setup provided with the Samba app for Yunohost.

So I tried removing the dfs_samba4, then I restarted Samba on the server, and smbclient was finally accessing the share!

In conclusion, I don't see why there is the dfs_samba4 parameter value in the share definition https://github.com/YunoHost-Apps/samba_ynh/blob/master/conf/share-smb.conf. Could you fix it in the Samba app source code, please?

Thanks!