DEV Community

Sandilya Bhamidipati
Sandilya Bhamidipati

Posted on

2 1

Hiding user accounts in MacOS

Hiding User account in MacOS

  1. Hiding user account from login window. — Simple
  2. Hiding user account from login window and system preferences — Advanced

1. Simple version

The simple version hides the user account from displaying in the list of user accounts during the login process. The account can be visible from system preferences as well as /Users. Here is how to achieve this effect:

sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add <username_to_hide>

And now you can reboot and the username mentioned above will not appear in the login window. If you want to revert this, you can run the following command

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

2. Advanced version

There are multiple ways of achieving a totally hidden user account. This method involves creating a user account which is no longer visible in system preferences, creating a home folder other than /Users and hiding all shared mount points. This is a true ninja account.

Creating a hidden user account with home directory other than /Users

sudo dscl . create /Users/dummy NFSHomeDirectory /var/dummy
sudo dscl . delete "/SharePoints/Dummy's Public Folder"

This command removes the Public Folder share point for the user with the long name "Dummy”

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more