2

I want to be able to connect from Windows 7 Explorer to SMB shares on different systems, using different credentials at different times.

How do you make Explorer offer a prompt to use different credentials? It seems if it knows credentials for a network share path, it uses them.

Or the opposite -- if it knows some credentials for that server, but you select a share that those creds don't have privileges for, then Explorer just says "you do not have permission".

And "Disconnect Drive" doesn't seem to apply here -- for one thing, network drives don't show up on that list unless mapped. And if they are mapped you can disconnect them, but when you browse back to them... Explorer uses the credentials it's remembered and logs right in with no prompt.

[Edit to add more details]

  1. I can use net use to delete everything from the list it uses (so 'net use' shows empty)... but Explorer still logs right back on using the same credentials. In one case that puts an item back on the net use list, for another share it does not. Either way, still can't change to different credentials.

  2. Part of the confusion when trying different approaches is probably this: https://blogs.msdn.microsoft.com/oldnewthing/20110223-00/?p=11413 which describes that there's a disconnect grace period of ten minutes. So 'net use * /d' doesn't take effect immediately.

  3. The 'net use /PERSISTENT:NO' command seems like it relates to this issue. But I couldn't get it to have any impact.

  4. Something that DOES work is killing the Workstation service, and then restarting it. At that point, attempting in Explorer to browse to previously-connected shares results in Explorer putting up a user/pwd dialog. Yay. But what a blunt instrument to get there. I'll also record for others who stumble in here that, for me, attempting to stop Workstation would hang in the "Stopping" state. I later discovered this occurs if (a) some Explorer window is browsing a share, or (b) I happen to have VPN software running (in my case NetExtender).

  5. I found this: Disconnecting / logging out from Windows network share without restarting Workstation service , in which the OP and others go through much of the same thought process... to no avail.

  6. This too might relate in some way: http://www.gadgetgrill.com.au/2009/11/19/windows-7-fixing-the-mapped-drive-credentials-problem/

So, problem not really solved -- I want to be able to gracefully switch a share to different credentials without having to clobber the VPN all other connections.

  • @gwidman in cmd try to remove the network connection with net use i.e. net use \\server\sharename /d or to delete all network connections net use * /d /y – Zalmy Jun 16 '16 at 13:13
  • 1
    I can use net use to delete everything from the list it uses (so 'net use' shows empty)... but Explorer still logs right back on using the same credentials. In one case that puts an item back on the net use list, for another share it does not. Either way, still can't change to different credentials. – gwideman Jun 16 '16 at 13:43
  • For me, net use worked to override the obsolete credentials, but I found no way to actually delete the old credentials. – Jan Hudec Aug 24 '17 at 10:32
4

Go to the Credential manager in your control panel (in user accounts and family safety)

Click in Windows Credentials and Select the credentials, delete what you need

Try to login en yours SMBs shares (if you delete correctly the credentials, windows ask you for user & password) and dont forget to uncheck Remenber my credentials

  • Thanks, but the credentials for the drives in question aren't appearing in Credential Manager. – gwideman Jun 16 '16 at 13:37
  • Try in control panel -- User Acounts -- Manage Credentials . Sometimes Windows save the credentials in User Profile ;) – Wendigo Jun 16 '16 at 13:48
  • Control Panel > User Accounts > Manage your credentials just brings up Credential Manager, same as before. Or did you mean something else? – gwideman Jun 16 '16 at 14:19
  • No, i mean exactly this :( – Wendigo Jun 16 '16 at 14:29
  • The credential manager has everything else (Exchange, TFS etc.), but does not seem to have the network shares. – Jan Hudec Aug 24 '17 at 10:29
0

In windows command prompt you can use the following the list the remembered credentials:

net use

The output will be similar to:

New connections will be remembered.


Status       Local     Remote                    Network

-------------------------------------------------------------------------------
OK                     \\123.123.123.123\shared      Microsoft Windows Network
The command completed successfully.

Then you can use the following command to delete the credentials:

net use <path> /delete

For the example above it would be:

net use \\123.123.123.123\shared /delete

UPDATE: Remember to close the explorer window and open a new one after this

  • You may notice in my original post that your suggestion is item number 1 on the list of things that I tried that did not work. – gwideman Apr 5 '18 at 15:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.