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

Hi,

let us assume we have an Network Share on Server myserver.mydomain.org. Server has IP Address 10.254.10.10.

accessing a share via IP Address works

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

The command completed successfully.

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

D:\> net use * \\myserver.mydomain.org\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:

    Target: Domain:myserver.mydomain.org
    Type: Domain Password
    User: test

Solution: Delete the entry and try again

D:\> cmdkey /delete:myserver.mydomain.org
CMDKEY: Credential deleted successfully.

Michael

Leave a Reply