I have a Mac running Mac OS 10.5.7. I want to set up a couple of SSH accounts for git usage. The accounts were initially configured with a home directory of /dev/null and a login shell of /usr/bin/false. In this setup, the accounts are not shown on the login screen or the fast user switching dropdown. However, in order for them to work with git, I needed to change their login shell to /opt/local/bin/git-shell. Once that change was made, they suddenly appeared on the login screen and the user dropdown. Is it possible to prevent these accounts from showing up in these lists?
Ssh – Can you set an account for SSH-only access in Mac OS 10.5
loginmac-osxssh
Best Answer
To hide a user:
Option 1:
If you create the users with a sub 500 UID it's possible to hide any user with a UID less than 500 on the Login Window by running:
sudo defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -boolean true
Another option:
Add the user to the HiddenUserList by running
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array $USERNAME
There is a guide available at MacOSXHints.