Windows: Error “2221 the username could not be found” occurs when connecting to a network drive


let us assume we have an Network Share on Server Server has IP Address

accessing a share via IP Address works

D:\> net use * \\\myshare$ 
Drive Y: is now connected to \\\myshare$.

The command completed successfully.

But accssing the share via Name or FDQN returns an error 2221

D:\> net use * \\\myshare$ 
System error 2221. The user name could not be found
The network connection could not be found

This could occurred when Windows uses credentials from the Windows Vault/Credential store which are obsolete.

List all saved credentials

D:\> cmdkey /list

Currently stored credentials:

    Type: Domain Password
    User: test

Solution: Delete the entry and try again

D:\> cmdkey /
CMDKEY: Credential deleted successfully.


Advertisment to support

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.