rclone: SMB backend - response error: The contacted server does not support the indicated part of the DFS namespace.
What is the problem you are having with rclone?
SMB commands giving error
What is your rclone version (output from rclone version)
rclone v1.60.0
- os/version: debian 11.5 (64 bit)
- os/kernel: 4.14.294-220.533.amzn2.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.19.2
- go/linking: static
- go/tags: none
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
amznlinux2, 64bit
Which cloud storage system are you using? (e.g. Google Drive)
SMB
The command you were trying to run (e.g. rclone copy /tmp remote:tmp)
rclone-linux-amd64/rclone ls 'smb:Shared/my/folders/here/' -vvv
A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)
root@hos:/# rclone-linux-amd64/rclone ls 'smb:Shared/my/folders/here/' -vvv
2022/10/24 02:09:22 DEBUG : rclone: Version "v1.60.0" starting with parameters ["rclone-linux-amd64/rclone" "ls" "smb:Shared/my/folders/here/" "-vvv"]
2022/10/24 02:09:22 DEBUG : Creating backend with remote "smb:Shared/my/folders/here/"
2022/10/24 02:09:22 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2022/10/24 02:09:22 DEBUG : fs cache: renaming cache item "smb:Shared/my/folders/here/" to be canonical "smb:Shared/my/folders/here"
2022/10/24 02:09:22 ERROR : : error listing: open my\folders\here: response error: The contacted server does not support the indicated part of the DFS namespace.
2022/10/24 02:09:22 DEBUG : 5 go routines active
2022/10/24 02:09:22 DEBUG : smb://myuser@myhost:445/Shared/my/folders/here: Closing 1 unused connections
2022/10/24 02:09:22 Failed to ls with 2 errors: last error was: open my\folders\here: response error: The contacted server does not support the indicated part of the DFS namespace.
rclone.conf
[smb]
type = smb
host = myhost
user = myuser
pass = myencpw
domain = MYDOMAIN
note: have also raised https://github.com/hirochachacha/go-smb2/issues/69
https://github.com/siemens/GoScans/blob/48c07101ed3cf1815928b1809f2462d89318eb29/smb/smb_windows.go seems to have some code for handling DFS
more info on DFS: https://wiki.samba.org/index.php/Distributed_File_System_(DFS) https://www.samba.org/samba/docs/using_samba/ch08.html https://learn.microsoft.com/en-us/windows-server/storage/dfs-namespaces/dfs-overview
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (6 by maintainers)
Commits related to this issue
- smb: allow SPN (service principal name) to be configured This enables connection to clusters. Fixes #6515 — committed to rclone/rclone by ncw a year ago
- smb: allow SPN (service principal name) to be configured This enables connection to clusters. Fixes #6515 — committed to rclone/rclone by ncw a year ago
- smb: allow SPN (service principal name) to be configured This enables connection to clusters. Fixes #6515 — committed to rclone/rclone by ncw a year ago
I’ve managed to use the branch, and successfully authenticate with a spn. Unfortunately the shares are still the hosts shares instead of the clusters.
After reviewing code more, I believe the issue is in hirochachacha/go-smb2 and how all hostnames are converted to ip address instead of hostname through session.addr. https://github.com/hirochachacha/go-smb2/blob/master/client.go#L72
\xxx.xxx.xxx.xxx\shares are different from \cluster\shares but the list shares function will only return \xxx.xxx.xxx.xxx\shares
I’ve included some information for debugging SPNs for the future below to help anyone else looking into similar issues in the future (but SPN didn’t resolve this issue).
To list the spn’s for a host, you can use the following command from windows:
setspn -l [host]The port is optional, so the targetSPN configured will probably be only
cifs/hostnamePlease tell me how to do that in a consumer version of Windows (more specifically, Windows 11 22H2 Education) or the equivalent is possible in Samba?Looks like Samba can do that,but sacrificing my server setup is hard a bit…Just remembered I have a few more server that I can use for it, I’ll try later https://wiki.samba.org/index.php/Distributed_File_System_(DFS) https://www.samba.org/samba/docs/old/Samba3-HOWTO/msdfs.htmlThat rclone.conf doesn’t seem valid or something is missing. There isn’t an option for type=smb in rclone.