Quick fix: Open Group Policy Editor (gpedit.msc). Navigate to Computer Configuration → Windows Settings → Security Settings → Local Policies → Security Options. Find Interactive logon: Do not display last signed-in. Set to Enabled. Click OK. Sign out and in. Login screen no longer shows the last user’s name and avatar; both username and password required.
By default, Windows 11’s lock screen shows the last signed-in user’s name and avatar. Useful for one-user PCs. For shared / corporate / public PCs, this leaks the username. Group Policy hides this. Each sign-in requires both username and password.
Affects: Windows 11 Pro/Enterprise/Education.
Fix time: ~5 minutes.
What causes this need
The default display of last user is convenient: just type password. But:
- Reveals user account to anyone seeing the screen.
- For shared PCs, defaults to wrong user.
- Corporate compliance may require username privacy.
- Useful in environments where attackers might brute-force a known username.
Method 1: Enable via Group Policy
The standard route.
- Open Group Policy Editor: Win+R →
gpedit.msc. - Navigate: Computer Configuration → Windows Settings → Security Settings → Local Policies → Security Options.
- Find Interactive logon: Do not display last signed-in. Double-click.
- Set to Enabled. Click OK.
- Optional: also enable Interactive logon: Don’t display username at sign-in. Hides current user’s name during password entry.
- Run Command Prompt →
gpupdate /force. - Sign out. Lock screen now shows generic prompt: “User name” and “Password” fields. Username and password required.
- For domain accounts: enter as
DOMAIN\usernameorusername@domain.
This is the standard fix.
Method 2: Registry equivalent for Home edition
For Windows 11 Home (no Group Policy).
- Open Registry Editor as Admin.
- Navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System. - Find or create DWORD: dontdisplaylastusername. Value:
1. - Also create DWORD: DontDisplayLockedUserId. Value:
3(hides both username and full user info).- Value 1: show user info.
- Value 2: show username only.
- Value 3: hide both.
- Close Registry Editor.
- Sign out and sign back in.
- Login screen prompts for username + password without last user info.
- To revert: set values back to 0 or delete the DWORDs.
This is the Home-edition path.
Method 3: Lock screen and welcome customization
For additional privacy.
- For full clean lock screen: Settings → Personalization → Lock screen. Untick Get fun facts, tips, and more from Windows and Cortana on your lock screen.
- For app notifications: untick apps from Choose which apps show quick status.
- For privacy on the welcome screen at boot: this is separate from lock screen. Same Group Policy applies to both.
- For BitLocker recovery key prompt visibility: BitLocker shows on boot anyway; not affected by username hiding.
- For audit/compliance: log login attempts with Event Viewer → Security log. Failed logins are tracked.
- For specific user accounts visible: by default, all enabled accounts show on first boot. Disable specific users to hide them:
net user "username" /active:no. - For removing recently-signed-in accounts list: registry HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\UserSwitch → Enabled DWORD = 0.
This is the broader privacy approach.
How to verify the fix worked
- Sign out. Lock screen shows generic Username and Password prompts.
- No avatar shown.
- Need to type username on every sign-in.
- Multiple-user PCs: no list of users visible (must know each username).
If none of these work
If username still shows: Group Policy not applied: gpresult /h C:\report.html to verify. Look for the policy in report. For Microsoft account login: shows email address. Inevitable unless you switch to local account. For Windows Hello PIN / face / fingerprint: shows user even if username hidden. The Hello prompt knows who you are. For domain PCs: corporate policy may override individual setting. Contact IT. For Insider builds: registry path may shift slightly. Check current build documentation. For accessibility tools: Narrator, Magnifier may speak username aloud. Adjust accessibility settings. For kiosk mode: separate from this; use Assigned Access feature for kiosks.
Bottom line: gpedit.msc → Interactive logon: Do not display last signed-in = Enabled. Or registry dontdisplaylastusername = 1 for Home. Lock screen will require username + password each time.