Hide a user account in macOS

Hide a user account in macOS


In this article we will see that how to hide a user account in MacOS. If you need to assist a user, but don't want them to see your user account when they log in, learn how to hide a user account on the macOS login window.



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

Note:- The user account is also hidden in System Preferences the next time it's opened. This command can't be used with the Guest user account.


Show a hidden user account

If you want to show the hidden user, set the user’s IsHidden attribute to 0:

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"

Tags:

Share:

0 comments

Please leave your comments...... Thanks