LAN plugin: Cannot connect to Ubuntu 20.04 using SMB2

Support for Android version of Total Commander

Moderators: sheep, Hacker, Stefan2, white

Post Reply
J.D
Junior Member
Junior Member
Posts: 2
Joined: 2021-01-13, 15:41 UTC

LAN plugin: Cannot connect to Ubuntu 20.04 using SMB2

Post by *J.D »

Hi,

I've been trying for days to get TC to connect to my Ubuntu 20.04 pc using the LAN plugin.
I am able to connect using Windows 10, Ubuntu 16.04 & another android app (foldersync) so I assume the server side is setup correctly.
I have tried every option I can think of. All the server names below, all combinations of tick boxes, with or without users & password.
The ip is 192.168.1.151 and the folder I'm trying to connect to is "Desktop"
Using Server names:
192.168.1.151
192.168.1.151/Desktop
//192.168.1.151
Result in "Getting directory, Error connecting to server,"
//192.168.1.151/Desktop
Results in "Getting directory, lookup 192.168.1.151/Desktop" & "SMB2 Connect:192.168.1.151/Desktop" &" DNS lookup 192.168.1.151/Desktop". After a few seconds it seems to give up. I though I was getting somewhere but I get the same result putting a random word in.

The server is set to share with "anyone", no user or password needed.
Windows connected fine just using "192.168.1.151", it showed the list of shared folders (eg Desktop)
Ubuntu 16.04 insisted on a user and password, worked whatever I put in there.
Foldersync needed a "share name" which had to be the name of the shared folder, in this case Desktop. (No user or password)

From what I've read Ubuntu 20.04 will have to connect using SMB2 or above.

I have tried plugin 3.07 & 3.20
It does work fine connecting to the windows pc but I'm not sure if that uses SMB2

Does anybody know what I'm doing wrong?

Any help would be greatly appreciated.

J D
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40202
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Cannot Connect to Ubuntu 20.04 using SMB2

Post by *ghisler(Author) »

The server is set to share with "anyone", no user or password needed.
That's the problem, my LAN plugin only supports shares protected with a user name and password.
Author of Total Commander
http://www.ghisler.com
J.D
Junior Member
Junior Member
Posts: 2
Joined: 2021-01-13, 15:41 UTC

Re: LAN plugin: Cannot connect to Ubuntu 20.04 using SMB2

Post by *J.D »

Many thanks for your reply

After some more reading on ubuntu samba I was able to create a password and it does now work well.
For the benefit of others who may have this problem, the command needed on the server is
$ sudo smbpasswd -a <user name>
(replace <user name> with an actual user name)

I was able to get this to work on an older (16.04) Ubuntu which supports SMB1 without the need for a password so I assume the "my LAN plugin only supports shares protected with a user name and password" is referring to SMB2

Strangely I can connect to a windows 10 PC (with the SMB2 box checked) without entering any user or password. Even more bizarre is that when I first try to open it I get "SMB2 CONNECT:connection timed out" and after about 20 seconds it appears to have failed, try again and it opens instantly.

Thanks again for your help
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 40202
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: LAN plugin: Cannot connect to Ubuntu 20.04 using SMB2

Post by *ghisler(Author) »

The plugin tries to connect with "anonymous" credentials when the connection via user name and password fails. This seems to use an empty user name. It's not possible to connect without any credentials at all, though.

Maybe it works with user "guest"?
Author of Total Commander
http://www.ghisler.com
Post Reply