Windows 2000 normally requires that any user who wants to log in at the local console must do so manually, usually by pressing Ctrl-Alt-Del and typing a username and password. Some users want to have the luxury of having the system log them in automatically. While this is a risky maneuver -- it makes it much easier to defeat logon security, especially if the console isn't behind a locked door -- there is a relatively easy way to do it. Not only that, but there's also a way to only allow it for a certain number of logins before the conventional login behavior kicks back in.
You hack the Registry to create this effect. To create a simple auto-logon, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\Winlogon and edit the DefaultUserName entry. Type in the user name you wish to use. Edit the DefaultPassword key to contain your password; if the key doesn't exist, create it as a REG_SZ for the data type. Add a value, a REG_SZ named AutoAdminLogon, and set it to 1. On the next reboot, you should be logged in automatically.
If you only want to enable this for the next x logons, add a REG_DWORD key into the same section of the Registry: AutoLogonCount. Set this to the number of times you want users to be automatically logged in. After this key reaches zero it's deleted from the Registry and AutoAdminLogon is set to 0.
Note that holding down the Shift key will override autologon and force a conventional logon. You can disable this by adding a REG_SZ string, IgnoreShiftOverride, to () and setting its value to 1.
Microsoft's freeware tool Tweak UI also allows you to set an autologon, but does not store the password in plaintext: the password value is kept in HKEY_LOCAL_MACHINE\SECURITY\Policy\Secrets\DefaultPassword, and is encrypted. Be warned that the password is usually stored as plaintext in the Registry, if you're not using Tweak UI to accomplish this effect, and that someone with remote Registry access can see it -- yet another reason to disable remote Registry services on any machine that does not absolutely need it.
Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter.
This was first published in October 2002