When you start your Windows 10 computer, the following error appears. Also, duplicate user accounts may appear on the login screen.
The user name or password is incorrect. Try again.
After you click the OK button, you’re prompted to enter the correct password. Also, you’ll notice that a duplicate user account of the same name appears in the lower-left corner.
Cause
This issue is seen in computers that have automatic login enabled. On the computers where auto-login credentials are stored, the error The user name or password is incorrect. Try again
and the duplicate user account may appear on the login screen due to one of the following reasons:
- You have changed the computer name recently. (or)
- You have changed the user account password recently.
When you enable automatic login by saving your credentials (via netplwiz.exe
), Windows stores the user name, password, and the computer (domain) name in the Winlogon
registry key below:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
For instance, after changing the computer name from DESKTOP-JKJ4G5Q
TO OPTIPLEX-9020
, the DefaultDomainName
(which represents the local computer name for standalone computers) registry value under the Winlogon
registry key still refers to the old computer name.
Likewise, the user account password for automatic login is stored under the following registry key which is highly protected and encrypted:
HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets\DefaultPassword
So, if you’ve changed the account password or the computer name after configuring automatic login, the system fails to auto-login to your account and shows a duplicate user account icon.
Solution
To prevent the duplicate user account from appearing and also the error “The user name or password is incorrect” at startup, clear the automatic login credentials, and then configure it again.
- Right-click Start, and click Run.
- Type
netplwiz.exe
orcontrol userpasswords2
and click OK. This opens the User Accounts dialog.
- Enable the User must enter a user name and password to use this computer checkbox.
- Click Apply.
- Uncheck the User must enter a user name and password to use this computer checkbox.
- Click Apply.
- Now, type in the username and password to save the credentials for automatic login.
The current user name and the domain (computer name) is filled up automatically. Type in the password, and click on the Enable button.
Restart Windows to check if the issue is resolved now.
Alternate fix
If you have changed the computer name (and not the account password) recently, you can fix this duplicate user accounts issue using the Registry Editor.
All you need to do is change the DefaultDomainName
registry value, mentioning the new computer name.