Hiding Users on OS X Lion's Login Screen
I recently changed my workflow at my job so that all my source lives on my laptop, rather than on an NFS-mounted disk on another server. I simply reversed the flow, so now, that server points to an NFS share on my laptop. It was shockingly easy to set all this up on Lion, but since NFS relies on numeric user IDs rather than user names, I was having problems with permissions. My user over there didn’t have the same numeric ID as my user over here.
My solution was to create a new user on my laptop with the correct numeric ID. Google revealed
dscl, OS X’s analog of
useradd on other Unix systems:
sudo dscl . -create /Users/brandanl ...
This worked like a charm — except this user was now showing up on the login screen, and I never intend to log in as him. Turns out, I just needed to unset his shell:
sudo dscl . -append /Users/brandanl UserShell /usr/bin/false