Microsoft

Step-By-Step: Hide the previous logon username in WinNT4

In defending against hackers and malicious users, admins can't neglect local security. One way to help lock down Windows NT systems is to hide the username of the previously logged on user, as this registry tip demonstrates.

This tip was originally published in TechRepublic's Windows NT e-newsletter.


If you work in a security-minded environment, you may want to disable the default setting in NT 4.0 that displays the name of the last person who logged on to the system. It's often far too easy to guess a user's password from his or her username or from the logon environment. We have a registry tip that can disable this setting.

Note
Remember that editing the registry can be risky, so be sure you have a verified backup before you begin.

Follow these steps:
  1. Open the Registry Editor (Regedt32).
  2. Select the HKEY_LOCAL_MACHINE key.
  3. Navigate to the subkey \Software\Microsoft\WindowsNT\ CurrentVersion\Winlogon.
  4. Go to Edit | New | String Value.
  5. Enter DontDisplayLastUserName for the string's name.
  6. Double-click the new string to edit the value.
  7. Change the value to 1, and click OK.
  8. Exit the Registry Editor.

Additional tip
You can automatically log on to your NT machine by applying the following registry patch to your system:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"DefaultUserName"="YourLogon"
"DefaultDomainName"="YourDomain"
"AutoAdminLogon"="1"
"DefaultPassword"="YourPassword"

A word of caution: This can be a big security risk, especially if your autologon ID has administrator privileges. In addition, your password is now saved in clear text in the registry. Use this only if you have a good reason (such as the need to autoinstall software on a temporary basis).

What do you think of this article format?
Our editors are developing and refining new methods and formats for delivering the solutions you need. Do shorter, step-by-step pieces such as this one better help you overcome the IT problems that keep you up at night? Share your thoughts with our editors, and you could win a free TechRepublic book or CD of your choice.


Editor's Picks