When Windows 10 starts, it shows you a login screen and prompts you for a password. If you have more than one user account in your OS, you will be able to click the user image of the account you want and then enter the account password. Instead, you can make Windows 10 ask you to type the user name too and then the password at the log on screen. It is a good security and privacy measure. Here is how it can be done.
To make Windows 10 ask for the user name and password on the login screen, you need to do the following:
- Press Win + R shortcut keys together on the keyboard to open the Run dialog. Type the following in the Run box:
Tip: Shortcuts with Windows (Win) key every Windows 10 user should know.
- Local Security Policy will be opened. There, go to the following location:
Local Policies\Security options
- Scroll down to the option called Interactive logon: Don't display last user name. Set it to Enabled as shown below:
- Click Apply and OK and sign out using your Start Menu.
After:Instead of the user account name indicated with a picture tile, the login screen will now show the text "Other user" and two text fields, where you can type your user name and the password, if it was set. Now, you will be able to login even into hidden accounts.
If your Windows 10 edition comes without the Local Security Policy tool (Home editions do not have it), then you can do the same change with a simple Registry tweak as follows:
- Open Registry Editor.
- Go to the following Registry key:
Tip: See how to jump to the desired Registry key with one click.
- Modify the 32-bit DWORD value named dontdisplaylastusername and set its value data to 1 as shown below:
- Restart your computer for the setting to take effect.
To undo this setting, set the "dontdisplaylastusername" value data back to 0 or switch the "Interactive logon: Don't display last user name" option back to "Disabled".
The same can be done using Winaero Tweaker. Go to Boot and Logon -> Hide Last User Name:
Use this option to avoid Registry editing.
Also, I prepared ready-to-use Registry files, which you can download here:
You just have to open the Registry files to apply the changes they have.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!
16 thoughts on “How to make Windows 10 ask for user name and password during log on”
Does it work for PINs and picture passwords?
It should work, but I have not checked.
No, it doesn’t, BUT look at the sign in options. You can there choose what account type you are using. (the key is the local or domain account , and the next icon(i think the rename icon) to it is the Microsoft account. Also , you can log in using the local/domain user., just write MicrosoftAccount\ and normally type your password. And also it works with the Home editions.
do you use the username you see, or the hidden actual username?
If I have Don’t display last login username checked my background will fade to the cave when I go to login. What do I do to fix this?
Is there a way to revert it? and make it ask for Password only?
Sure, set the policy back to “Disabled” or set the Registry value “dontdisplaylastusername” to 0.
Please help. I used the method to enable the password protection on Windows 10 HOME edition by editing the registry. It worked but now I can’t sign in. I didn’t set up a password when I setup the computer last year and I assumed it would prompt me to do so after following the above method and restarting the computer. It didn’t and now I’m locked out.
There’s an option to reset the password and when clicked it says to insert a flash drive and try again. I did this but still get the same message saying a flash drive is needed.
Please help me out here!
if you didn’t set up a password, leave the box blank. simply hit enter after you’ve punched in your username.
I have just made a change on Winaero to show last user and restarted.
This change to the registry has now not allowed me to logon to my computer that is on a domain.
Have no access to the RODC administering the computer and I am fearing I have to now reimage.
The error message I get is:-
“security policies on this computer are set to show info about the last interactive sign-in,but windows couldn’t retrieve that info. contact your system administrator for help”
Have been all through the safe mode restarts (options) and the PC refuses to show me any administrator accounts.
I know that there is an Administrator account on the PC however safe mode tells me that it is not there…
Can you help?
My Windows 10 Edition is Education 1703
Set DisplayLastLogonInfo to 0.
Start from the USB key or DVD, mount the SYSTEM hive, and edit it.
Can I make it so that one user appears and the others still have to enter a username and password?
You should display a warning on this one. I, like another user, checked this and now can’t log on re security policy in a corporate environment. Working with help desk to fix.
I know this is a use at your own risk program but this setting is dangerous in a corporate environment and there should be a note about that.
I have two accounts on my laptop, one is Administrator and the other is Local Account. I have hidden my Administrator account using RegEdit by creating Special Account.
Now I want to unhide the Administrator but the limited credentials of Local Account doesn’t allow me to change the Special Account feature in Regedit.
What should I do?
Go to c:\windows\system32 and shift+right-click on the regedit.exe file. run it as another user, provide your administrative credentials.