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-ID: 7365366884

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

Ausgedruckt am: 23.11.2024 um 00:11 Uhr

Pjordorf
Pjordorf 31.05.2023 aktualisiert um 00:27:35 Uhr
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
Lochkartenstanzer
Lochkartenstanzer 31.05.2023 um 00:37:47 Uhr
Goto Top
Hi,

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

lks
FordPerfect
FordPerfect 31.05.2023 um 00:51:49 Uhr
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 ...
FordPerfect
FordPerfect 31.05.2023 um 00:55:28 Uhr
Goto Top
I checked - it does:

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


Tested with Powershell
Lochkartenstanzer
Lochkartenstanzer 31.05.2023 aktualisiert um 06:58:39 Uhr
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.
FordPerfect
FordPerfect 31.05.2023 um 22:59:27 Uhr
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
7010350221
7010350221 01.06.2023 aktualisiert um 11:30:24 Uhr
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
FordPerfect
FordPerfect 03.06.2023 um 22:03:05 Uhr
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
Lochkartenstanzer
Lösung Lochkartenstanzer 04.06.2023 um 00:48:33 Uhr
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
7010350221
Lösung 7010350221 04.06.2023 aktualisiert um 07:11:05 Uhr
Goto Top
Zitat von @Lochkartenstanzer:
opkg install samba4-utils
opkg install samba4-libs
opkg install samba4-client

This should do it.
Yes, indeed.