Creating 'secret' user accounts in 10.2

Sep 16, '03 09:25:00AM

Contributed by: Mitchell

This hint combines two other hints I read here on MacOSXHints.com. We have an iMac, largely used by my children, but upon which I have an admin user account. I can also imagine situations where for reasons of business or personal privacy it might make sense to have an invisible account. If Zach or Victoria becomes the principal user of the computer and finds scrolling down to log in a bit of a nuisance, perhaps Mom or Dad can hide their accounts. To avoid having a parent's account show up or even be visible to one of the kids, both at the login screen and from the /Users folder, adopt the following steps:

  1. In System Preferences, Accounts, create the user you want. Make special note of the short username; you'll need that when you...

  2. Open /Applications -> Utilities -> NetInfo Manager. Scroll the center pane down to users, click the lock and enable changes, and select the short username you just created. In the bottom pane, delete the value for the property "realname". DO NOT delete the property itself, just click on the value entry until the text is editable and delete the name of that user. The effect of doing this will be to suppress the display of your new user in the login panel.

  3. Open the terminal and type sudo setfile -a V /Users/new_short_username. This makes the home folder for the new user invisible in the /Users folder. As an aside, I did this with the "Shared" folder. I had deleted it previously but as it happens the iTunes store keeps subscriber information there.
You now have an invisible user on your machine. To log in, press the down arrow once at the login panel, and then press option-Return. You will be presented with name and password fields. Type your new short user name and your new password, and you're in as a reasonably stealthy new user of the machine.

This is no substitute for real data privacy, of course. There's nothing to prevent a determined user, especially with an admin password, from finding out that the account exists by typing ls -a /Users/. But it does keep a curious kid from finding your account if you want to prevent that.

Comments (18)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030912130602462