Domanda

The traditional method of creating a hidden user account on OSX (i.e does not show up on the login window or system preferences > accounts pane) is to create it with a UID of less than 501.

However, on 10.8 the accounts that I'm creating with lower UIDs are still showing up in the accounts pane in system preferences..

Did this feature change?

And if so, then how are the other accounts being hidden?

È stato utile?

Soluzione

You need to tell the login screen to hide low-numbered accounts:

sudo defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool YES

This used to be the default behavior, but it changed... quite a while ago. Alternately, you can hide specific accounts by name:

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

See Apple's KB article #HT5017: How to hide a user account in OS X.

Altri suggerimenti

If you set the user's shell to /usr/bin/false it hides the user from the login, so you should do something like this: -

dscl . -create /Users/Hidden UserShell /usr/bin/false

where Hidden is the name of the user. This also prevents this user from being able to login, so is used in cases where daemon services require their own user.

The downside to setting Hide500Users or specifying the HiddenUsersList is that the login screen then contains an extra option of "Other...".

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top