Home > Mac administration, Mac OS X > Hiding user accounts in Yosemite

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

Screen Shot 2014-12-31 at 3.15.11 PM

The account in question should disappear from the Users & Groups preference pane in System Preferences.

Screen Shot 2014-12-26 at 12.45.31 PM

To unhide the account, run the command below with root privileges:

dscl . create /Users/username_goes_here IsHidden 0

Screen Shot 2014-12-26 at 12.47.26 PM  

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

Screen Shot 2014-12-26 at 12.47.04 PM

The account in question should now be visible in the Users & Groups preference pane in System Preferences.

Screen Shot 2014-12-26 at 12.44.32 PM

To further hide a user account, the account’s home directory can also be moved from /Users to a new location.

Screen Shot 2014-12-26 at 1.44.23 PM

  1. January 5, 2015 at 1:05 am

    Reblogged this on Alex Kaloostian.

  2. ijakesays
    January 5, 2015 at 10:14 pm

    I’m assuming this still does not change the behavior of the FV2 Preboot login screen, yeah?

    • January 5, 2015 at 10:17 pm

      Correct, this does not affect how FileVault 2-enabled accounts are displayed at the FileVault 2 preboot login screen.

  3. Jonathan
    January 20, 2015 at 12:18 am

    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?

  4. Bruce
    March 5, 2015 at 10:16 pm

    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?

  5. Erik
    September 24, 2015 at 9:33 am

    @Bruce, Yes same experience. (10.10.5)

  6. January 8, 2016 at 3:37 am

    Has anyone found a way to hide the account in the Preboot screen of FV2 ?

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: