Hiding user accounts in Yosemite
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.
Reblogged this on Alex Kaloostian.
I’m assuming this still does not change the behavior of the FV2 Preboot login screen, yeah?
Correct, this does not affect how FileVault 2-enabled accounts are displayed at the FileVault 2 preboot login screen.
How would I go about incorporating this into a Casper Configuration, so It hides a local user account created using CreateUserPkg within the same workflow?
If you’ve already moved the home directory of the account to a different (more discrete) location, such as within the /var/ directory, the dscl . create command generates an error.
create: Invalid Path
DS Error: -14009 (eDSUnknownNodeName)
At least, it does for me on a brand new MacBook Pro running 10.10.2. Anyone else experience this?
@Bruce, Yes same experience. (10.10.5)
Has anyone found a way to hide the account in the Preboot screen of FV2 ?