fordperfect
Goto Top

Connect to Windows 10 Share (SMB1 succeeds, SMB2 fails)

Problem description: that mounting SMB1 on a Windows 10 computer works as follows because "SMB1 Support" is enabled:

mount -t cifs -o user=USER,password=USER,vers=1.0 //192.168.1.222/SHARE /tmp/test

When I disable "SMB1 support" on the Windows 10 machine AND type at "vers=2.0 or 2.1", I get the following error message back from the SSH console:

"failed: Host is down"  

Can you please help me to find the correct command line to "negotiate" modern SMB2 shares on a modern computing environment?

Thank you very much!

Content-Key: 7365366884

Url: https://administrator.de/contentid/7365366884

Printed on: June 15, 2024 at 00:06 o'clock

Member: Pjordorf
Pjordorf May 30, 2023 updated at 22:27:35 (UTC)
Goto Top
Hi,

Zitat von @FordPerfect:
"failed: Host is down"
What or who is your SSH host? Not only SMBv1 disabled, but also SMBv2/3 enabled?
https://learn.microsoft.com/en-gb/windows-server/storage/file-server/tro ...

face-smile https://www.automobilwoche.de/agenturmeldungen/ford-verabschiedet-sich-v ... face-smile

Regards,
Peter
Member: Lochkartenstanzer
Lochkartenstanzer May 30, 2023 at 22:37:47 (UTC)
Goto Top
Hi,

I guess, that your smb-server doesn't support newer Versions of SMB. Check Your server.

lks
Member: FordPerfect
FordPerfect May 30, 2023 at 22:51:49 (UTC)
Goto Top
Hey Peter!

ich habe mich nach einem Charakter in meinem Lieblingsbuch benannt - etwas modifiziert, denn er nennt sich "Ford Prefect"

___________________________________________________________________________________

Getestet mit Powershell:

SMB1 ist "False"
SMB2/3 ist "True"


https://learn.microsoft.com/en-gb/windows-server/storage/file-server/tro ...
Member: FordPerfect
FordPerfect May 30, 2023 at 22:55:28 (UTC)
Goto Top
I checked - it does:

SMB1 ist "False"
SMB2/3 ist "True"


Tested with Powershell
Member: Lochkartenstanzer
Lochkartenstanzer May 31, 2023 updated at 04:58:39 (UTC)
Goto Top
Did you try the mount command without a Version Parameter?

lks

Btw: which samba version do you use?

PS: Try if smbclient works.
Member: FordPerfect
FordPerfect May 31, 2023 at 20:59:27 (UTC)
Goto Top
Thank you for the tips:

if I try smbclient I get the following error via SSH:


-ash: smbclient: not found

__________________________________________________________

If I try without the "ver=*" Parameter, I get the following error message via SSH:

mount: mounting 192.168.0.220/CROSSROADS on /tmp/test failed: Host is down

__________________________________________________________

How do I find out, which SAMBA version I use?


Thanks
Mitglied: 7010350221
7010350221 Jun 01, 2023 updated at 09:30:24 (UTC)
Goto Top
Quote from @FordPerfect:
-ash: smbclient: not found
Then you have to install smbclient on your system. What kind of system are you working on (distribution, kernel version, etc.)((uname -a) I am asking because you are working with the ash shell, that usually mean you are working on an embedded or like system where memory is crucial. It could be that this system currently does not support higher SMB Versions as 1.0.

Which SMB dialects your version of CIFS supports, can be read by issuing the following command:
/sbin/modinfo cifs

The output should be similar to this (example from current Archlinux distro)

screenshot

Try to install smbclient via your package manager and use the parameter -d 10 to enable verbose debug messages. (Older versions had a max level of 255 newer ones only 0-10, just try out the values).
smbclient -L //server/share -U <username> -d 10

Also try to add the verbose parameter to the mount command
mount -t cifs --verbose -o user=username,password=passw0rd //server/share /mnt
Regards
Member: FordPerfect
FordPerfect Jun 03, 2023 at 20:03:05 (UTC)
Goto Top
Thank you Ultramatic,

I will try to answer all your questions and would like to say thank you for helping me on this.

/sbin/modinfo cifs
-ash: /sbin/modinfo: not found

uname -a
Linux i4b 3.18.44 #37 Fri Feb 17 14:44:32 UTC 2023 mips GNU/Linux


using --verbose die not yield more information, than without, I´m afraid.


SMBCLIENT is not available for my device, however - I found these here, which supposedly are possible to install:

opkg install samba4-utils
opkg install samba4-libs
opkg install samba4-client
Member: Lochkartenstanzer
Solution Lochkartenstanzer Jun 03, 2023 at 22:48:33 (UTC)
Goto Top
Zitat von @FordPerfect:


SMBCLIENT is not available for my device, however - I found these here, which supposedly are possible to install:

What kind of machine and Distribution are you using?

opkg install samba4-utils
opkg install samba4-libs
opkg install samba4-client

This should do it.

lks
Mitglied: 7010350221
Solution 7010350221 Jun 04, 2023 updated at 05:11:05 (UTC)
Goto Top
Zitat von @Lochkartenstanzer:
opkg install samba4-utils
opkg install samba4-libs
opkg install samba4-client

This should do it.
Yes, indeed.