Unable to connect to Samba Share

Having issues with your DietPi installation or found a bug? Post it here.
Humph
Posts: 6
Joined: Wed Aug 11, 2021 8:46 pm

Unable to connect to Samba Share

Post by Humph »

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?
Capture.PNG
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to connect to Samba Share

Post by Joulinar »

Hi,

what would be the output of following command

Code: Select all

mount -t cifs -o "username=MyUserName,password=myPas$werd,vers=3.0" //(your host ip)/(your remote share name) /mnt/my_mount_dir
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Humph
Posts: 6
Joined: Wed Aug 11, 2021 8:46 pm

Re: Unable to connect to Samba Share

Post by Humph »

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.
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to connect to Samba Share

Post by Joulinar »

ok can you share the entire command and output. Just remove private information like user/pw
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Humph
Posts: 6
Joined: Wed Aug 11, 2021 8:46 pm

Re: Unable to connect to Samba Share

Post by Humph »

Sure, neither of these work:

Code: Select all

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:

Code: Select all

[  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
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to connect to Samba Share

Post by Joulinar »

could you try using smb version 2.1

Code: Select all

mount -t cifs -o username=***,password=***,vers=2.1 //192.168.5.1/dietpi/ /mnt/Backups
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Humph
Posts: 6
Joined: Wed Aug 11, 2021 8:46 pm

Re: Unable to connect to Samba Share

Post by Humph »

Same error as vers=2.0
User avatar
Joulinar
Posts: 5619
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to connect to Samba Share

Post by Joulinar »

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

Code: Select all

CIFS: VFS: \\192.168.5.1 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 :?

@MichaIng
any ideas?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
WarHawk
Posts: 773
Joined: Thu Jul 20, 2017 8:55 am

Re: Unable to connect to Samba Share

Post by WarHawk »

write protect set to no?
https://www.draytek.com/support/knowledge-base/5152
l
Well unless you run it as sudo
https://linuxize.com/post/how-to-mount- ... -on-linux/

Code: Select all

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
Humph
Posts: 6
Joined: Wed Aug 11, 2021 8:46 pm

Re: Unable to connect to Samba Share

Post by Humph »

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.
Post Reply