Hiding usernames from your OS X login screen

After upgrading from OS X 10.8.x to 10.10.2 recently, I noticed the login screen had reverted to displaying the usernames. Looking in the Users & Groups Preferences I see there’s only an option to display the usernames in a list or as icons, but no way to turn them off. I’ve not had them displaying on my past OS X version(s) for as long as I can remember, but I am not sure how I turned that off. Anyway… here’s how to prevent usernames displaying on your login screen.

Motive? — Security

Why would you want to hide the usernames from your login screen? Perhaps you wouldn’t. I do it for security purposes. It makes it that much harder for someone to hack into your computer if they don’t know what any of the usernames are, especially if you also encrypt the hard drive.

Disabling usernames at login

You’ll need to bring up Terminal.app (just type Term… into Spotlight [Command-Space is the fast way to bring up Spotlight] and Terminal will show up in there).

Copy and paste in the following command. You’ll need to change user1 and user2 to the usernames you wish to hide. You can list one after the other, with no commas. If you only have one, just replace “user1 user2” with it.

sudo defaults write /Library/Preferences/com.apple.loginwindow.plist HiddenUsersList -array-add user1 user2

There are also system tweaking tools that allow you to do this without using Terminal. I suspect that’s what I used previously. MacPilot is one, although ridiculously (considering it’s an app most people are likely to use a few times initially, and then rarely, if ever, use again) expensive at $29.95—needless to say, I don’t recommend it. Another option is OnyX, which is free. Tinkertool is another free option, although it has a fairly limited range of settings, and doesn’t have one for disabling the display of usernames on the login screen.

Using OnyX

In OnyX I suspect what you need to select is the Parameters page, then Login. Then look for this:

OnyX login options

Un-tick them all, if you don’t want any showing up.

If you splash out on MacPilot

The setting you are looking for is in the under FEATURES and the Login. You can deselect the various classes of user (admin, local, etc.) or tick a box next to the name(s) of those you wish to hide.

MacPilot 7 Login-1

Finding the username

If you are not sure what the username is (which is unlikely) you can obtain it from the Users & Groups settings in System Preferences. Just start typing “users & gro…” into Spotlight. It’ll show it. Once in that panel, check if the lock in the bottom left corner is unlocked. If not, click it, and type in your password to unlock the panel.

Next, you can Option-click or two-finger click (depending on whether you’re on a trackpad, or what-have-you) on a username to bring up an Advanced Options menu.

com.apple.preferences.users.rem

What you’ll see next is this:

System-Preferences-username-advanced

The username is “Account name“. That’s what you’ll need to type in with your commands in Terminal.

Going back

If you ever decide you need to unhide one or more of the hidden usernames, use this command:

sudo defaults delete /Library/Preferences/com.apple.loginwindow HiddenUsersList

With this modification implemented, your login screen will look something like this:

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay on top - Get updates in your inbox