This article is intended for system administrators. If you believe this issue affects you, contact the system administrator for your business or school.
Hide a user account in the macOS login window
1. Log in as an admin user.
2. Use this Terminal command. Substitute the short name of the user that you want to hide for “hiddenuser”:
sudo dscl . create /Users/hiddenuser IsHidden 1
If you later want to show the hidden user, set the user’s IsHidden attribute to 0 like this:
sudo dscl . create /Users/hiddenuser IsHidden 0
If you want, you can delete the IsHidden attribute instead.
Hide the home directory and share point
You can move the hidden user's home directory to a place that's not visible from the Finder. And you can remove the hidden user's Public Folder share point.
This command moves the home directory of "hiddenuser" to /var, a hidden directory:
sudo mv /Users/hiddenuser /var/hiddenuser
This command updates the user record of "hiddenuser" with the new home directory path in /var:
sudo dscl . -create /Users/hiddenuser NFSHomeDirectory /var/hiddenuser
This command removes the Public Folder share point for the user with the long name "Hidden User”:
sudo dscl . -delete "/SharePoints/Hidden User's Public Folder"