How to Enable Windows Auto-Login Without a Password

Usually, you want to secure your Windows account with a strong password or other authentication methods. However, there may be situations where you want to set up a Windows computer to log in automatically without requiring a password. If only one user operates a PC and the computer is physically protected from unauthorized access, you can afford the convenience of bypassing password login. Although Microsoft has reduced the auto-login options, enabling autologon in Windows 10/11 is still feasible.

Using netplwiz.exe

Automatic login can be configured using the account management tool (netplwiz.exe). For this purpose, you can find the checkbox Users must enter a user name and password above the list of users.

However, netplwiz.exe no longer displays the autologon option by default. But there is a trick to reactivate this checkbox by adding this registry entry:

reg add "HKLMSOFTWAREMicrosoftWindows NTCurrentVersionPasswordLessDevice" /v DevicePasswordLessBuildVersion /t REG_DWORD /d 0 /f

However, this configuration has no effect when Windows runs in a Hyper-V VM, and you are connected via Enhanced Session Mode. Additionally, automatic login is not available when accessing Windows via RDP.

To configure the automatic logon via netplwiz.exe, enter the credentials of the specific user

If you disable this option and click Apply, you must enter the name and password of the user who should be automatically logged on. The utility then writes the name as DefaultUserName into the Registry.

One drawback of netplwiz.exe is its consistent use of the local computer’s name as the default domain, which consequently eliminates the ability to utilize a domain account for autologon.

Modifying the registry

If preferable, you have the option to manually input all necessary entries into the registry under HKLM:SOFTWAREMicrosoftWindows NTCurrentVersionWinlogon:

  • DefaultUserName
  • DefaultPassword
  • DefaultDomainName

All values are of type REG-SZ (character string). Additionally, you must change AutoAdminLogon to the value 1.

Edit values for automatic logon in the registry

This can be done by adapting the user and their password in the following code, saving it in a file with the extension .reg, and then executing it by double-clicking.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]

"AutoAdminLogon"="1"

"DefaultUserName"="<username>"

"DefaultDomainName"="contoso"

"DefaultPassword"="<password>"

Using SysInternals

Using the SysInternals tool Autologon is the easiest way to achieve a logon without a username and password. It does not need to be installed, so you can execute it immediately after downloading.

It presents a simple dialog with username, password, and domain fields. Like netplwiz.exe, Autologon does not save the password as plaintext in the registry. Instead, it stores it as an LSA secret.

Undoing auto-login

You can disable automatic logon again with netplwiz.exe by checking the previously mentioned option. If auto-login is activated, the checkbox should always be visible. If this is not the case, enter the following command instead to turn off automatic logon:

reg add “HKLMSOFTWAREMicrosoftWindows NTCurrentVersionWinlogon” /v AutoAdminLogon /t REG_SZ /d “0” /f

Summary

Users can enjoy added convenience by skipping the logon process if an environment is deemed secure enough. The preferred on-board tool for achieving this is netplwiz.exe, although it may not display the respective option in newer Windows versions. This checkbox can be reactivated through a registry entry.

Subscribe to 4sysops newsletter!

If that method doesn’t work, the necessary registry keys can be added directly. However, a simpler alternative is to use Autologon from the SysInternals toolbox.


Posted

in

, , ,

by

Tags: