Problem accessing SMB share using SMB2 and LMv2

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
bobobear1977
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-26, 23:49 UTC

Problem accessing SMB share using SMB2 and LMv2

Post by *bobobear1977 »

Hi!

For some reason, TC suddenly stopped connecting to my SMB2 shares with LMv2 auth enabled on all my android devices (Samsung Galaxy S7 and Galaxy Tab S3, both with Nougat 7.0), giving a "no route to host" error. Setting the LMv1 option made it work again, which is acceptable as a temporary workaround. I did some more testing, and it turns out that when reverting everything to SMB1, LMv2 auth works fine, which is weird. So, the only combination out of the possible four currently not working is SMB2 and LMv2.

The counterpart is a Synology DiskStation running DSM 6.1.4-15217 u5 (current version).

A couple of days ago, everything worked like a charm. There were no system updates on any of the devices or the NAS since then and I made no config changes to the NAS in the meantime.

Any idea how to get SMB2 and LMv2 working together again?

Many thanks and greetings,
bb
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Are you sure the diskStation supports SMB2? LMv2 authentication is supported by both SMB1 and SMB2.

However, the error seems to indicate a problem with name resolution. My plugin tries both DNS lookup and SMB name resolution, and uses whichever returns the name first. "No route to host" indicates that the server returns multiple IP addresses, but not all of them can be reached from the phone.
Author of Total Commander
https://www.ghisler.com
bobobear1977
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-26, 23:49 UTC

Re: Problem accessing SMB share using SMB2 and LMv2

Post by *bobobear1977 »

Thanks for the info, I gave the problem another look. To me, it really doesn't make sense. Here's what I've got:

The server in question is a Synology DS1517+ running the latest update of DSM 6.1.4 from December 21, 2017. The samba server installed on it is a v4.4.13 and supports everything up to SMB3. I can configure the "min protocol" and "max protocol" options from the DSM Web UI, currently it's set to accept all SMB Versions, but I will disable SMB1 as soon as this issue is resolved. The box is connected to a switch using all 4 GBit Ethernet ports in a static link aggregation group. Lastly, there is a FritzBox 7590 also connected to that switch acting as Router, Gateway, DHCP-Server, DNS and what-not. All three of these devices have the latest software installed and none have received any updates or have been reconfigured by me since December.

Here's what I've tested so far:
- Windows Clients find the DiskStation in the network places and connect fine.
- Linux Clients mount all shares correctly using SMB1, SMB2 or SMB3 as mount options.
- TC on Android works with three combinatoins: SMB1+LMv1, SMB1+LMv2, SMB2+LMv1
- TC does no longer work with SMB2+LMv2, since a few days ago. Before that, it worked well. Nothing in the configuration of either the network devices or the phone was changed at the time it stopped working

I have always used the IP address of the DS1517+ rather than the server name setting up the connection to the shares in TC, so name resolution should not be a problem. In testing, I removed the connections from TC and set them up again, trying both IP address and server name, all of which came up with the same results. I have also already rebooted all of the devices in question, to no avail.

So, I seem to end up with the rather confusing question of why this one configuration in TC suddenly might have stopped working after being OK ever since the SMB2 option was added to the plugin.

Have you got any ideas where else to look for the error?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, unfortunately not - it may be a bug in the used smbj library (maybe the DiskStation isn't 100% LMv2 compatible or so), resulting in a protocol error. But I couldn't find any bug reports regarding LMv2 in the github project of smbj.
Author of Total Commander
https://www.ghisler.com
bobobear1977
Junior Member
Junior Member
Posts: 3
Joined: 2018-01-26, 23:49 UTC

Re: Problem accessing SMB share using SMB2 and LMv2

Post by *bobobear1977 »

The problem is resolved. Yesterday brought a Synology update, after which the problem was gone. Seems it was something with the NAS after all...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I see - thanks for letting me know!
Author of Total Commander
https://www.ghisler.com
User avatar
S474N
Junior Member
Junior Member
Posts: 11
Joined: 2003-02-23, 11:24 UTC
Location: Czech Republic

Re: Problem accessing SMB share using SMB2 and LMv2

Post by *S474N »

I have similar problem. Windows 11 23H2 + TCMD 11.02 and I cannot login to NAS (SMB). If I test via standard File explorer from Win, everything is OK.

EDIT: after restart PC is everything OK :mrgreen:
Post Reply