Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Hide users from the login window via prefs System 10.4
Tiger only hintA hidden user is a user that can login to the system, but the account will not be displayed in the Login Window, where all of the other accounts on the machine are listed. In lab or work environments, it's often desired to have a hidden user that has Admin rights for administrative functions and/or other special circumstances.

In OS X 10.3 and prior all that you needed to do to hide a user from the login window was to create the account with a UID (user id) below 500 (all accounts normally created via the OS X GUI have UIDs greater than 500).

With the introduction of Tiger, things have changed. Tiger will now show (most) users, even if the UID is below 500, unless the account is UID 0 (root). The other variable that seems to stop the user (with a UID below 500) from being seen in the login window is if their default shell is set to /dev/null (other things might also cause the user to be hidden, but I don't know for sure). When we're talking about admin or special kinds of accounts, you most likely don't want to set the default shell to /dev/null ... so what to do...

Finally! Here's the hint. Tiger's login window preferences now supports a new setting called HiddenUsersList, which is an array of one or more user names. If you wanted to hide three users from the login window, the command to execute via the terminal would be:
sudo defaults write /Library/Preferences/com.apple.loginwindow \
HiddenUsersList -array-add account1 account2 account3
where account1, account2, and account3 are the short user names for the accounts you need to hide. This would add additional names to any that might already exist. To hide just one account, you'd simply type:
sudo defaults write /Library/Preferences/com.apple.loginwindow \
HiddenUsersList -array-add account1
As of 10.4.2, the default Tiger install doesn't have any user names automatically hidden. To unhide all the names you may have previously hidden, you could execute the following from the command line.
sudo defaults delete /Library/Preferences/com.apple.loginwindow \
HiddenUsersList 
As always, make a backup of any preference file you might change so you can move back to it.
    •    
  • Currently 2.86 / 5
  You rated: 3 / 5 (7 votes cast)
 
[68,204 views]  

10.4: Hide users from the login window via prefs | 27 comments | Create New Account
Click here to return to the '10.4: Hide users from the login window via prefs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Hide users from the login window via prefs
Authored by: renderhead on Aug 31, '05 11:09:32AM

Thanks for the hint! Is there any way to hide a user in the fast user switching menu as well?



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: network23 on Aug 31, '05 11:25:06AM

I had that question too, or more to the point, can you use Fast User Switching to move between a hidden and visible acct?

---
Live and Direct, only from
Network 23



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: MattHaffner on Aug 31, '05 12:52:07PM

I think setting the UID less than 500 trick worked for me for fast switching. I noticed that it did nothing for the login window, so I reverted. I'll have to try again...



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: nathannutter on Aug 31, '05 04:41:58PM

When I used this command the user was removed from Fast User Switching as well. If it does not remove it try turning off Fast User Switching first, then re-enable it.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: Ockham on Aug 31, '05 04:46:25PM

Cool hint. Once the user is hidden, how do you select it for login via the main login screen (or FUS)?



[ Reply to This | # ]
10.4: Logging in as a hidden user
Authored by: pservice on Aug 31, '05 05:51:45PM

To login as a hidden user with Fast User Switching, choose the "Login Window ..." option near the bottom of the FUS menu. That gives you a window in which you can type the user name and password of the hidden user. I assume that the same applies to the login window that appears at start up.

Related point: Under Tiger, assigning a UID less than 500 will hide a user in the Accounts preference pane, even though the user still appears in the login window list and the FUS menu. I haven't checked to see if this hint (i.e., adding a HiddenUserList to the loginwindow.plist) will also hide the user in the Accounts pref pane.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: aronr on Aug 31, '05 07:36:37PM

Once the user is hidden, how do you select it for login via the main login screen (or FUS)?

And the initial response in this thread was:

To login as a hidden user with Fast User Switching, choose the "Login Window ..." option near the bottom of the FUS menu. That gives you a window in which you can type the user name and password of the hidden user. I assume that the same applies to the login window that appears at start up.

To follow-up on the previous response:

Under Mac OS X 10.3.9, at least, but not necessarily Tiger:

  1. Get to the login window, either at startup or after selecting "Login Window..." from the bottom of the Fast User Switching menu.
  2. Press Option-Right Arrow.
  3. Press Return. Alternately, click the entry for any other, non-hidden user.

You will be presented with Name: and Password: fields, into which you can enter the name and password of any user, including any hidden users.

Note: This didn't work on the one 10.4.2 system I tried it on. Does anyone have suggestions for how, in the login window, to switch from a list of one or more named users to a Name: and Password: login?



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: gommino_2000 on Aug 31, '05 09:38:18PM

In Tiger, to get the Name: & Password: fields, press down-arrow and then shift-option-enter.

Rob.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: pme on Oct 04, '05 02:42:53PM

Don't make things more complicated than they are.

To get the user/password-fields just:

1. Select a visible user, using the keyboard (i.e. press the down arrow key)
2. press [opt]+[return]

voila!

/P-M



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: chabig on Aug 31, '05 07:22:31PM

I tried this hint. It did hide users from the login window, but they still appeared in the FUS menu.

Chris



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: gommino_2000 on Aug 31, '05 09:40:07PM

You have to logout and login again.

Rob.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: barefootguru on Mar 18, '06 03:28:56PM

Logging out and in again still didn't hide the user from FUS for me. I ended up going the whole hog and rebooting, but try disabling and then re-enabling FUS as suggested above.

Cool hint!



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: barefootguru on Mar 23, '06 10:53:35AM

Ah, it only hides the user from FUS if the user isn't logged in.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: afb on Aug 31, '05 11:54:12PM

Thanks, this is a great hint, but now how do I get rid of the "Other..." icon in the login window?



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: efs on Oct 06, '05 06:35:49PM

You're right -- I would like to clean up the login screen by removing the "other..." prompt. Apparently, it comes on automatically as soon as an account is hidden, but I prefer to use option-return to get the prompt boxes rather than having "other.." at the bottom of the list.

Does anyone know how to remove this?



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: jyeary on Jan 07, '06 11:47:58AM
To prevent the Other... login from appearing use: sudo defaults write /Library/Preferences/com.apple.loginwindow \ SHOWOTHERUSERS_MANAGED -bool false

[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: Subterraneus on Jan 20, '06 01:17:51PM

I have the same problem, with the "other" user but when I use [CODE] sudo defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool false [/CODE] nothing changes, the "other" user is still sitting there.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: Brandon White on Jul 27, '06 12:26:27PM

These two lines get rid of the "Other..." icon in the login window and the fast-user-switching menu:

sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add cadmin

sudo defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool false



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: Brandon White on Jul 27, '06 01:06:48PM

Above, cadmin was the name of the user I intended to hide.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: albertoricart on Sep 24, '05 09:44:52AM

My man page in tiger doesn't have -array-add, it however has -array followed by the list of values. Calling the command as specified didn't work for me on my 10.4.2 machine.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: nash0205 on Nov 18, '05 04:44:40PM

is in the /Library/Preferences/com.apple.loginwindow.plist
open the file with property list editor and you see the first field named HiddenUsersList

great tip



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: chinarut on Jan 16, '06 06:15:04AM

I'm looking to hide the administrative user i created (not root). When I run the command logged in as my non-Admin user, I get this:

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

If I try 'sudo -u' it doesn't seem to work either.

I prefer not to have to enable my root account.

Am I missing something?

What password is it requesting?



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: magnamous on May 26, '06 01:00:23AM
When a user tries to use sudo for the first time, that display comes up. The password it is asking for is the password for the current user. If that user is not an administrator, the command will not work. In order to get it to work you must first log in as an administrator. Type login in the Terminal, enter your administrator username and password, type in your sudo command, enter the administrator password (as that is the user which is now trying to use sudo), and it should work. When it's finished, type logout or exit, and the Terminal will log out the administrator. For more information on how sudo works, type man sudo.

[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: deleted_user7 on Jan 20, '06 08:08:53PM

Is there a way to unhide the user? I have tried everything and I am not able to unhide it. I would really appreciate the help. I have looked through every possible mac search thing that I can think of and this is the one that comes closest. I would really appreciate the help.



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: Salmiak on Feb 05, '06 11:18:09AM
Did you try the last one?: "As of 10.4.2, the default Tiger install doesn't have any user names automatically hidden. To unhide all the names you may have previously hidden, you could execute the following from the command line."
sudo defaults delete /Library/Preferences/com.apple.loginwindow \
HiddenUsersList


[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: Ynot on Feb 25, '08 08:46:24PM

Is there a way to hide this account in the Accounts Pref's window?



[ Reply to This | # ]
10.4: Hide users from the login window via prefs
Authored by: JewelShadow666 on Jan 18, '12 03:38:53PM

Is there a way to keep other admins from resetting the password of the root user? I'm not sure where this question belongs- I'll gladly move it once I can navigate this site. Sorry for any inconvenience.



[ Reply to This | # ]