Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create a hidden account on my mac os x for security purposes. I thought this process would be much easier but I have run into ALOT of difficulty figuring out how to do it, and I thought it would be much easier to do. I can use terminal (somewhat) but I do need a step-by-step process because I'm not really the most tech-savy guy in the world.

share|improve this question

Open Terminal and enter the following:

sudo defaults write /Library/Preferences/ HiddenUsersList -array-add accountshortname andanotherone

This removes the entered users from the login window. It might add an entry Other… to it though, so everyone will see you hid something.

Alternatively (additionally?), open System Preferences » Accounts » Right-click list entry » Advanced and change the account's user ID to something below 500.

You can also move the user's home directory in that dialog, so your evil plan isn't foiled by someone viewing the /Users directory.

Then, open Terminal and enter:

sudo defaults write /Library/Preferences/ Hide500Users -bool TRUE

This setting will hide all user accounts with IDs below 500 without creating the Other… entry. Remember that you won't be able to easily log in anymore! Regular users are assigned IDs starting with 501.

Since all user accounts are visible to every user of your machine (likely even guests) using dscl, there's no point to do more than hide the user from Login Window, or change it to require you to enter password and username instead of selecting a list entry (System Preferences » Accounts » Login Options » Display login window as:).

share|improve this answer
Note that if you change the user ID and home folder setting, you'll also need to actually move the home folder contents to the new location and change its ownership to the new ID. For example, if you just set accountshortname to have a home in /var/.accountshortname (i.e. an invisible filename in an invisible parent folder), you could fix up the home folder with sudo mv /Users/accountshortname /var/.accountshortname; sudo chown -R accountshortname /var/.accountshortname – Gordon Davisson Apr 8 '11 at 20:21
well thank you that worked! i did your alternate way of changing the user ID to below 500, but i did that and the "other" entry came up on the screen, how do i get rid of that? – Jack May 15 '11 at 16:41
@Jack See towards the end of my post. It's possible to hide them. Remember to click the checkmark next to my answer to mark it as accepted once it works for you. – Daniel Beck May 15 '11 at 16:46
well I tried entering "sudo defaults write /Library/Preferences/ Hide500Users -bool TRUE" in terminal and it did not remove the other setting. I just copy and pasted it in should that work?? – Jack May 15 '11 at 17:06
@Jack The options aren't exclusive. To undo one of them, enter sudo defaults delete /Library/Preferences/ NameOfPreference. – Daniel Beck May 15 '11 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .