Have you ever wished to hide your user account from the login screen of Mac OS X? This has been made possible with OS X Yosemite using Terminal and different method can be used for older OS X versions. Yes, you can hide specific user account on OS X for whatever purpose you want. The main reason behind hiding any specific user account from login screen is usually security. In this article, we will tell you about one specific terminal command which can be used to hide specific user account on OS X.
Hide user account from OS X login screen
While you are logged into any admin user account, open a Terminal from OS X Applications and type following command:
Here, in above command replace the
USERACCOUNT text with your own user name that you want to hide from login screen.
sudo dscl.create/users/USERACCOUNT IsHidden 1
This command only works in OS X Yosemite and to hide user account in older version, follow given method below.
Mentioned user account in command will be hidden from login screen, user login and logout menu and from fast user switching menu as well. For this command to work, you will need to restart your computer. That specific user account will be hidden from the login screen when the computer restarts.
Move user account directory
Using Finder anybody can see the list of OS X user accounts by going into users directory. You should also move the account directory from users home directory to another location and also remove the Public Folder share point, this will completely hide the account.
Type the following command to move user’s account directory to another location and remember to replace
USERACCOUNT with your own user account.
sudo mv /Users/USERACCOUNT /var/USERACCOUNT
After moving directory you need to update account record with new path of home directory.
sudo dscl . -create /Users/USERACCOUNT NFSHomeDirectory /var/USERACCOUNT
Also remove the public folder share point for the user.
sudo dscl . -delete "/SharePoints/USERACCOUNT's Public Folder"
Show user account on login screen
Later, If you need to show that hidden account on login screen, type following command:
sudo dscl.create/ users/USERACCOUNT IsHidden 0
Hide account in older OS X versions
OS X Yosemite or later versions users should use above method and OS X version 10.4 users can use this command and make user’s account invisible from login screen. You will be able to hide user account by simply adding that account to hidden user list in
Adding account to hidden user list
Suppose we want to hide user account Ali and Kane, so the command syntax will be:
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add ali kane
com.apple.loginwindow is file and we adding ali and kane user account to
Show login window with username and password fields
Normally on OS X login screen, username is already displaying with avatar and you need to enter password only. You can ask for username as well so this way you can hide user account name from login screen.
Open OS X Preferences and select “Users & Groups” or “Accounts” according to OS X version. Click Login option and then select option to “Display login window as” Name and password.
I need help. When I shut down or restart my computer, the hidden user shows. How can I get rid of that? I need to find out asap before I leave for boarding school.
Would you please tell me which macOS version you are currently using on your Mac?
Given that you have Macbook, why would you need to restart/shut down your MB? You dont need to do it.