Commander forgets Network Credentials

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
levitas
Junior Member
Junior Member
Posts: 2
Joined: 2022-06-27, 13:02 UTC

Commander forgets Network Credentials

Post by *levitas »

Annoying issue. Windows 7 64 bit SP1 - Running TC 10.00 as Administrator - Regular Microsoft Work share not Domain or HomeGroup

Tried to Map the Network drive in both Windows Explorer and/or Total Commander. Same result

In Total Commander, when I choose the Mapped Network Drive, Windows Credential request pops up. When I try from Windows Explorer it connects without asking. I close and restart Total Commander same result. I enter the credentials. It holds in the same Windows session. If I restart Windows, Total Commander forgets the credentials or better word Windows Credential request pops up again.In Windows Explorer never happens, always goes through without asking, no matter how many restarts.

This annoyed me so much, I installed a fresh Windows in a VM. Same result. Updated Windows patches to the latest. Same result. Just to check if my Windows messed up.

Is it because I always start my Total Commander in admin ? Doesn't make sense.

Any help is appreciated.

Thanks
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Commander forgets Network Credentials

Post by *Dalai »

levitas wrote: 2022-06-27, 13:23 UTCIs it because I always start my Total Commander in admin ?
Yes, it is. You can try it yourself by running TC not as admin.
Doesn't make sense.
It does if you understand how network shares work in Windows. Simply put, every user has separate network drives. "Drives" in this context also includes connections made via UNC. "User" in this context not only means "user" but also "running as admin".

Some technical information: Connections to an SMB share use a token. Every user has a different token. Processes running elevated (as admin) have a different token than ones running non-elevated. As you can probably guess from this information, this issue isn't limited to TC but every program you can run as admin, including other file-managers like Explorer++. Since Windows/File Explorer can't be run elevated, it doesn't show this behavior.

Regards
Dalai

PS: This issue has been discussed quite a lot over the years.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Commander forgets Network Credentials

Post by *ghisler(Author) »

On Windows Vista and newer, network drives are mapped separately for each user. Running a program "As admnistrator" is treated like
a separate user. To fix it, either run Total Commander as a normal user, or do the following:
1. Run regedit.exe
2. Go to the following key:
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows/CurrentVersion/Policies/System
3. Right click in the right panel, and create a new DWORD entry with the name
EnableLinkedConnections
4. Set the value to 1
5. Restart your computer

Microsoft explains it here:
https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/mapped-drives-not-available-from-elevated-command

Unfortunately there is a bug on Windows 8 and 8.1: If a normal user creates a mapped network drive to a subfolder like \\server\share\subfolder, the
elevated user will see the drive, but it points to \\server\share instead of pointing to the subfolder. I don't know whether this bug is still there in Windows 10 and 11.
Author of Total Commander
https://www.ghisler.com
levitas
Junior Member
Junior Member
Posts: 2
Joined: 2022-06-27, 13:02 UTC

Re: Commander forgets Network Credentials

Post by *levitas »

Sorry, I searched this forum for this problem but probably I failed to enter the right keywords. Thank you for the detailed explanation. I guessed but now it makes sense. And thank you for the fix. I tried it immediately and it worked perfectly.

Thank you very much
JOUBE
Power Member
Power Member
Posts: 1447
Joined: 2004-07-08, 08:58 UTC

Re: Commander forgets Network Credentials

Post by *JOUBE »

But here I am missing the obligatory note that you should not run the TC as an administrator at all times, because all programs started from it (parent process) (*.exe *.cmd *.com *.bat) are then also run as administrator, what should not be desired (protection).
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Commander forgets Network Credentials

Post by *Dalai »

2JOUBE
Now the note isn't missing anymore ;). But you're right, of course.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
JOUBE
Power Member
Power Member
Posts: 1447
Joined: 2004-07-08, 08:58 UTC

Re: Commander forgets Network Credentials

Post by *JOUBE »

Dalai wrote: 2022-06-28, 12:31 UTCBut you're right, of course.
Normally you are the regular, who writes this in Threads.

So I'm a little surprised that you didn't make this comment here in this thread... ;-)

I think, this thread can be moved to "will not be changed".
Post Reply