How to Hide the Last Logged on User Account in Windows


**Disclosure: This post contains affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you.

The Microsoft Windows operating system allows you to have multiple user accounts on the same computer. That way, each person who uses the shared computer will have their own desktop, user folders and customization settings. You can have Microsoft accounts on your shared PC as well as local accounts.

One thing that you may have noticed when you log into your Windows computer is that it will show the username of the last logged in user account. So if you are trying to keep your computer usage a little more private, we will be showing you how to hide the last logged on user account in Windows. This way, nobody will know who was using the computer last.

When you have multiple accounts on your computer and go to the login screen, you will see the last logged in user account listed as well as any other user accounts configured on the computer.

Windows login screen

To hide the last logged on user account in Windows, we will be showing you two separate methods. This first one involves editing the Windows Local Security Policy which is only available on Windows Professional edition computers. There is a way to enable the Local Security Policy editor on Windows Home edition computers if you want to use this method.

To open the Local Security Policy, you can simply type in secpol in the Windows taskbar search box. From there you will need to go to Security Settings > Local Policies > Security Options and look for the setting called Interactive login: Don’t display last signed-in.

How to Hide the Last Logged on User Account in Windows

You can then double click on Interactive login: Don’t display last signed-in to open its settings. Next, you will need to enable the policy and click the OK button.

How to Hide the Last Logged on User Account in Windows

Now when you log off your computer, you will see a blank log in screen where your users will need to type their username and password. If they are using Microsoft accounts, they will need to type in their email address and then the Microsoft Account password that goes along with it. It will also hide the other user accounts configured on the computer.

How to Hide the Last Logged on User Account in Windows

It is also possible to only hide the list of configured user accounts on your computer by following the steps outlined here.

The next method we are going to use to hide the last logged on user account in Windows involves a simple registry edit. You can perform this edit manually or you can import the changes from preconfigured registry files that you can download here.

There are two files included in the zip file. There is one to apply the change and one to undo the change if you want to have the last logged on user account displayed again.

 

Here is what the registry file looks like to hide the last logged on user account.

Windows Registry Editor Version 5.00

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]

“dontdisplaylastusername”=dword:00000001

Here is what the registry file looks like to undo the changes.

Windows Registry Editor Version 5.00

 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]

“dontdisplaylastusername”=-

To apply the registry edit, all you need to do is extract the registry files from the zip file and double click the file named Hide Last Signed in Users.reg. You will then need to click on the Run button to continue.

Import registry file

Then you will need to click the Yes button for the UAC prompt.

UAC Prompt

You will then be shown what changes will be made to your computer and you will need to click the Yes button once again.

Import registry file

Finally, you will be given a confirmation message that the values from the file have been added to the Windows registry.

Import registry file

To see these changes in the registry, you can type in regedit in the taskbar search box to open the Windows Registry Editor.

You can then navigate to the following location or copy and paste the text below into the address bar of the Registry Editor.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

As you can see in the image below, there is a value called dontdisplaylastusername with a value of 1.

How to Hide the Last Logged on User Account in Windows

You can double click on dontdisplaylastusername and change it from 1 to 0 to disable this process as well.

How to Hide the Last Logged on User Account in Windows

For additional training resources, check out our online IT training courses.

Check out our extensive IT book series.

Related Posts

© 2025 Online Computer Tips
Website by Anvil Zephyr