I have a Samba Share hosted on a DrayTek Router 2925, running off a USB Key.
The Share itself works fine when accessing from a Windows device. The Server prompts for a Username and Password, then I connect and can see all the Folders and Files.
But using Drive Manager in DietPI I cannot get it to connect. Attached is the error I get every time. I don’t know a huge amount about Linux, but I have tried various switches I’ve found online by editing FSTab, and trying Mount, and trying SMBClient - none of them work. Attached is a screenshot of the error I receive from Drive Manager.
mount -t cifs -o username=***,password=***,vers=1.0 //192.168.5.1/dietpi /mnt/Backups
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount -t cifs -o username=***,password=***,vers=2.0 //192.168.5.1/dietpi/ /mnt/Backups
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Dmesg gives more:
[ 393.947414] CIFS: Attempting to mount //192.168.5.1/dietpi
[ 394.434826] CIFS: VFS: \\192.168.5.1 Dialect not supported by server. Consider specifying vers=1.0 or vers=2.0 on mount for accessing older servers
[ 394.434992] CIFS: VFS: cifs_mount failed w/return code = -95
[ 394.510835] CIFS: Attempting to mount //192.168.5.1/dietpi
[ 394.515860] CIFS: VFS: \\192.168.5.1 Dialect not supported by server. Consider specifying vers=1.0 or vers=2.0 on mount for accessing older servers
[ 394.516001] CIFS: VFS: cifs_mount failed w/return code = -95
[ 394.592814] CIFS: Attempting to mount //192.168.5.1/dietpi
[ 394.597957] CIFS: VFS: blob signature incorrect \xa1\x81\xa40\x81\xa1\xa0
\xa1
+\x827
\xa2\x81\x8b\x81\x88NTLMSSP
It’s not a Windows Share. Hosted on a DrayTek. Other devices (Windows Clients) can access the Share fine so no issues with write protect.
I’m logged in as Root on the DietPi - same errors as in my previous post. It really does seem an issue with the SMB versions, but I can’t seem to find any combination of switches that will allow me to successfully use SMB 1.0/2.0 in DietPi.
I guess this is not related to DietPi. We simply install the SMB client package from Debian repository. Most probably same will happen on normal Raspberry OS.
When you add an SMB/CIFS share via dietpi-drive_manager, it loops through all existing SMB protocol versions from the highest 3.1.1 to the lowest 1.0 and tries to connect with all of them, before adding the first functional one to /etc/fstab.
If you use the mount source //192.168.5.1/dietpi, this means there needs to exist an SMB share called “dietpi” on the server. Given it is a DrayTek server and no DietPi system, is this the case?
The version is set via the vers=n.m mount option, which you used already. Check out the man pages as well about other mount options and possible hints: https://manpages.debian.org/mount.cifs
I’m not sure whether the Windows client has some automatic share detection, if the given one does not exist. When you enable the Samba share in DrayTek, there must be a setting to see and choose its name. I.e. if you did not manually enter “dietpi” somewhere, it won’t be an existing share and at least the Linux client cannot connect then.