LAN plugin can't connect to Windows 8 share

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
terryhau
Junior Member
Junior Member
Posts: 3
Joined: 2013-08-10, 03:19 UTC

LAN plugin can't connect to Windows 8 share

Post by *terryhau »

It connects fine to Windows 7 shares.
When I try on my Windows 8 share, it just gets stuck on the connecting screen. The user account is linked to a Microsoft account, which means the user name is in the form of an email address. Not sure if that is causing the problem.

Thanks.
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

Same problem here. If I wait for about 10 minutes the drive list does appear, but entering a drive displays the "busy" throbber and no further response occurs.

Other Android tools I use (ES File Explorer, X-Plore) connect blink-of-an-eye instantly.

My sign-on is also an email address.

Win8/64 <-> Android 4.1.2
Last edited by JohnFredC on 2013-08-12, 23:01 UTC, edited 2 times in total.
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, no idea - I couldn't find any Windows 8 specific reports concerning JCIFS (the library used by TC for LAN access). Does it work with a local (non-e-mail) account? The '@' sign in the user name might be a problem.
Author of Total Commander
https://www.ghisler.com
terryhau
Junior Member
Junior Member
Posts: 3
Joined: 2013-08-10, 03:19 UTC

Post by *terryhau »

Just tried a local account and it connects instantly, so it is something to do with the Microsoft account.

I use an app called FolderSync which also uses JCIFS and it connects using Microsoft account just fine. I believe ES File Explorer also uses JCIFS and that works too.

I've discovered a workaround though.
It seems like Microsoft accounts also have a 'local' name which is your first name. You can see this if you go to your users folder (eg. C:\Users\John). You can actually log in with your just first name ('John' in this case), rather than with your email address, and it works in Total Commander.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I just checked the sources - there is currently no special treatment of the @ sign in my code. The only special treatment is for domain names, but that's specified in the server field, not the name field. Maybe I just need to use a newer version of JCIFS...
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48232
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This is a bug/misfeature in the JCIFS library: It treats a user name in the form of a mail address (user@server) as a combination of user and domain: user@domain.

Please try the following test version of the plugin, which should fix this:
https://plugins.ghisler.com/aplg/tcandroidlan204b1.apk

The following change was necessary in JCIFS to make e-mail addresses work as user names:

Code: Select all

In smb\NtlmPasswordAuthentication.java:
In function:
public NtlmPasswordAuthentication( String domain, String username, String password ) {
look for:
            ci = username.indexOf('@');
            if (ci > 0) {
replace by:
            ci = username.indexOf('@');
            int ci2 = username.lastIndexOf('.');
            if (ci > 0 && ci2<ci) {   // Windows 8: e-mail address as user name
Author of Total Commander
https://www.ghisler.com
terryhau
Junior Member
Junior Member
Posts: 3
Joined: 2013-08-10, 03:19 UTC

Post by *terryhau »

Thanks for the fix. It's working now.
Post Reply