Log an administrator on automatically

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

Requires Free Membership to View

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

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.