Hide local macOS admin users
Description
Hide local admins at the login window
Ingredients
Directions
#!/bin/sh
# This script is a Postflight sample
# benm @ fw
#hide the just made admin account and enable screen sharing
echo "hiding local admins at the login window"
#enable hidden admins
sudo defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool YES
#enable "other..." option at login window
sudo defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool TRUE
To show admins at the login window again. Send out:
sudo defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool NO