On December 8th, 2014, Apple posted a KBase article showing a way to hide user accounts in Yosemite that was different than the methods available in previous versions of OS X.
In Yosemite, you can add an IsHidden user attribute to the user’s account record and set a specific value in order to hide or unhide the account:
- Hide: Set the IsHidden user attribute’s value to 1
- Unhide: Set the IsHidden user attribute’s value to 0
It’s also possible to unhide a hidden account by deleting the IsHidden user attribute from the user’s account record. For more details, see below the jump.
The dscl command line tool should be used to to set the IsHidden user attribute. To hide a user account, run the command below with root privileges:
dscl . create /Users/username_goes_here IsHidden 1
The account in question should disappear from the Users & Groups preference pane in System Preferences.
To unhide the account, run the command below with root privileges:
dscl . create /Users/username_goes_here IsHidden 0
As mentioned previously, an account can also be un-hidden by deleting the IsHidden user attribute. To do this, run the command below with root privileges:
dscl . delete /Users/username_goes_here IsHidden
The account in question should now be visible in the Users & Groups preference pane in System Preferences.
To further hide a user account, the account’s home directory can also be moved from /Users to a new location.