My wife doesn't use a password on her account so when I boot into Windows 11, I always have to log out of her account first because it logs her in automatically. How can I disable that without giving her a password?
6 Answers
I just had a similar issue in Windows 11. As Ramhound wrote in a comment, you just need enable Users must enter a user name and password to use this computer after running netplwiz. However, this checkbox can be missing (as mentioned here).
To get the checkbox back, set DevicePasswordLessBuildVersion to 0 in registry branch HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\PasswordLess\Device
I was finally able to stop this behavior in Windows 11 Pro 23H2 by using Group Policy Editor (gpedit.msc
):
Navigate to
Local Computer Policy
→Computer Configuration
→Administrative Templates
→Windows Components
→Windows Logon Options
Double-click
Sign-in and lock last interactive user automatically after a restart
Change the setting to
Disabled
:Click OK to apply the change
Extra digging
For the curious (and benefit of anyone with Windows 11 Home), I used Process Monitor to see what's actually going on behind the scenes with this policy and it appears that it sets the following registry key's value to 1
:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\DisableAutomaticRestartSignOn
Auto-login can be set in the registry. If that's your case, you may remove it like this:
- Run
regedit
- Position to the key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
- Right-click the following items and select "Delete":
AutoAdminLogon
,DefaultUserName
,DefaultPassword
- Logout/login or reboot to test.
-
3I don't have those keys, and yet this still happens. I do have "AutoLogonSID", which is suspicious– rkjCommented Nov 11, 2023 at 2:54
-
@rkj - You don't have those keys because you did not configure a default user. Once you uncheck
Users must enter a user name and password to use this computer
, the appropriate keys will be created, after the prompt is displayed.– RamhoundCommented Jul 21 at 19:36
Open Netplwiz:
- Press
Windows Key + R
to open the Run dialog. - Type
netplwiz
and pressEnter
.
- Press
User Accounts:
- In the "User Accounts" window, you'll see a list of all user accounts on your PC.
- Click on the user account for which you want to disable auto-login.
Uncheck the Option:
- At the top of the window, you'll see an option labeled "Users must enter a user name and password to use this computer." Make sure this box is checked.
Apply and Close:
- Click
Apply
and thenOK
.
- Click
*Restart your Computer
This is a stub, but maybe someone can find it useful.
One issue here is that Windows 11 remembers the last logged on user, and will automatically go to that account after startup (and will log in if no password is set).
Last user is saved in the registry, at key:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI
Last logged on user can be cleared with the following .bat file, which I've found in this thread and I have verified works in Windows 11 when run as administrator.
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnUser /f
reg delete HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnUserSID /f
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnUser
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI /v LastLoggedOnUserSID
echo last logged on user has been cleared
pause
exit
So, one would need to find a way to run such a script after the user without password has logged out, and before the machine shuts down: At next startup, Windows will provide a screen from which to choose the user for logon.
-
This could work but you would have to run the script every time. It might be worth considering if it was really the only option, but it's not.– ShiftyCommented Jul 22 at 20:49
Disable auto login for Windows10 and 11 with this simple steps.
- go to settings> Accounts.
- On the left side of the window you will find Sign In Options.
- Click on Sign in options and you will find "If you’ve been away, when should Windows require you to sign in again" Toggle When PC wakes up from sleep. You can try other alternatives if you are using a older version of Windows.
Users must enter a user name and password to use this computer.
checkbox? You should enable it. Your system has a user, defined as the default user, when your system boots the user is automatically logged in. By indicating the user must supply a password, that user will have to enter a password, in the case of a user without a password it's a blank password.