Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,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 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[46,399 views]  

10.4: Hide users from the login window via prefs | 26 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 whomever 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 Wed, Aug 31 2005 at 11:09AM PDT
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 Wed, Aug 31 2005 at 11:25AM PDT
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 Wed, Aug 31 2005 at 12:52PM PDT
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 Wed, Aug 31 2005 at 4:41PM PDT
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 Wed, Aug 31 2005 at 4:46PM PDT
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 Wed, Aug 31 2005 at 5:51PM PDT
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 Wed, Aug 31 2005 at 7:36PM PDT

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 Wed, Aug 31 2005 at 9:38PM PDT
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 Tue, Oct 4 2005 at 2:42PM PDT
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 Wed, Aug 31 2005 at 7:22PM PDT
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 Wed, Aug 31 2005 at 9:40PM PDT
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 Sat, Mar 18 2006 at 3:28PM PST
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 Thu, Mar 23 2006 at 10:53AM PST
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 Wed, Aug 31 2005 at 11:54PM PDT
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 Thu, Oct 6 2005 at 6:35PM PDT
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 Sat, Jan 7 2006 at 11:47AM PST
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 Fri, Jan 20 2006 at 1:17PM PST
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 Thu, Jul 27 2006 at 12:26PM PDT
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 Thu, Jul 27 2006 at 1:06PM PDT
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 Sat, Sep 24 2005 at 9:44AM PDT
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 Fri, Nov 18 2005 at 4:44PM PST
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 Mon, Jan 16 2006 at 6:15AM PST
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 Fri, May 26 2006 at 1:00AM PDT
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 Fri, Jan 20 2006 at 8:08PM PST
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 Sun, Feb 5 2006 at 11:18AM PST
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 Mon, Feb 25 2008 at 8:46PM PST
Is there a way to hide this account in the Accounts Pref's window?

[ Reply to This | # ]