How to hide a user from the login screen in MacOS
![](https://techstuff.se/wp-content/uploads/2022/04/how-to-hide-a-user-from-the-login-screen-in-macos.jpeg)
This guide will show you how to hide a user from the login screen in MacOS and unhide them again. It’s a pretty short straight forward guide and takes just a few minutes to follow through.
- Create a user with optional name, .e.g. User1
- Create a directory with root somewhere using the terminal (replace with your user)
sudo mkdir /var/<username>
- Open System Settings and choose Users and Groups
- Right click on the user you are trying to hide (e.g. User1) and choose Advanced settings
- Change the home directory to the one you created in step 2. (e.g. /var/User1)
- Run the following in the terminal to hide the user from the login screen (replace with your user):
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add <username>
To show all hidden users again, run the following command in the terminal:
sudo defaults delete /Library/Preferences/com.apple.loginwindow HiddenUsersList