When connecting shared network folders via net use
or the File Explorer GUI on Windows, there is sometimes some rather strange behavior. For example, you may receive the error:
The network folder specified is currently mapped using a different user name and password. To connect using a different user name and password, first disconnect any existing mappings to this network share.
Another error occurs if you try to map the same shared folder from the command prompt:
net use \\PCNAME07\D$ /user:myuser1
System error 1219 occurred. Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again.
It turns out that Windows doesn’t allow to map a shared folder from a remote computer under different usernames (The network folder specified is currently mapped using a different user name and password https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/cannot-connect-to-network-share).
This KB recommends mapping the second network drive by an IP address rather than the remote computer name (As an alternative to this solution, you can create additional aliases for this computer in the DNS or local hosts file). In this case, LanmanWorkstation considers them as two different resources and allows mapping network drives under different users.
If you receive a multiple connection error under a single user, you must first remove the connected drives and clear the local cache.
Open the command prompt and list mapped drives:
net use
Delete all mapped drives connected from the remote host:
net use /delete [paste the value from the Remote column]
For example:
net use /delete \\PCNAME07\D$
net use /delete \\PCNAME07\IPC$
net use /delete Z:
net use * /delete
Then check and delete any saved passwords for the remote computer in Windows Credential Manager:
rundll32.exe keymgr.dll,KRShowKeyMgr
klist purge
Then restart the local Workstation service from the services.msc
console or using the command:
net stop workstation /y && net start workstation
net start netlogon
Then try mapping the network drive from a remote computer.
The problem of mapping network drives with different user credentials often occurs when using external NAS or shared folders on Samba. This article describes how to reset the connection cache and to map network drives under the same or different users.
1 comment
Thanks a lot … I wasn’t able to reach my NAS after windows 24H2 update … this fixes it for me.