Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dfs_samba4 parameter value in share configuration makes it inaccessible #9

Open
floot opened this issue Jan 27, 2023 · 0 comments · Fixed by #10
Open

dfs_samba4 parameter value in share configuration makes it inaccessible #9

floot opened this issue Jan 27, 2023 · 0 comments · Fixed by #10

Comments

@floot
Copy link
Contributor

floot commented Jan 27, 2023

Describe the bug

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

Context

  • Hardware: VirtualBox 7.0
  • YunoHost version: 11.0.11
  • I have access to my server: Through SSH
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
  • Using, or trying to install package version/branch: 4.9.5~ynh3

Steps to reproduce

  • Install samba app. I used the Yunohost admin web UI for that.
  • Still in the Yunohost admin web UI, create a new user or change the password of an existing user. His username will be referred as <ynh_username> bellow
  • From a client host (Ubuntu in VirtualBox VM, in my case), ensure you have smbclient installed (e.g. apt install smbclient)
  • From this client host, enter this command: smbclient -U <ynh_username> //<ynh_server_name_or_ip>/share, then enter the user's password

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant