Unable to connect to Samba Share

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.

Has anyone else come across this?


what would be the output of following command

mount -t cifs -o "username=MyUserName,password=myPas$werd,vers=3.0" //(your host ip)/(your remote share name) /mnt/my_mount_dir

Sorry I forgot to add - my Samba Server does not support higher than SMB 2.0, which I think is a likely cause.

If I try Mount with vers=1.0 or vers=2.0, these don’t work either.

ok can you share the entire command and output. Just remove private information like user/pw

Sure, neither of these work:

mount -t cifs -o  username=***,password=***,vers=1.0 // /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 // /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 //
[  394.434826] CIFS: VFS: \\ 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 //
[  394.515860] CIFS: VFS: \\ 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 //
[  394.597957] CIFS: VFS: blob signature incorrect \xa1\x81\xa40\x81\xa1\xa0


could you try using smb version 2.1

mount -t cifs -o username=***,password=***,vers=2.1 // /mnt/Backups

Same error as vers=2.0

probably a limitation of the samba server as you have following error message.

CIFS: VFS: \\ Dialect not supported by server.

Means the SAMBA server can’t communicate with the client. But I’m not sure what options are needed to enable the client to talk to the server :thinking:

any ideas?

write protect set to no?
Well unless you run it as sudo

sudo mount -t cifs -o credentials=/etc/win-credentials,uid=1000,gid=1000,dir_mode=0755,file_mode=0755 //WIN_SHARE_IP/<share_name> /mnt/win_share

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 //, 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

Yes I can successfully connect to the Share \\DietPI from a Windows Client, so the Share must exist?

Wondered if anyone else has had similar issues when attempting the same from other Router based OS’s such as DrayTek OS?

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.