Hide local macOS admin users
Description
HideUse a FileWave Fileset script to hide local adminsmacOS atadmin accounts from the login window while keeping the Other option available for manual username/password sign-in.
Ingredients
FWFileWave CentralProperA plain-text editor(likeforTextWranglerreviewing-theOSscriptXbeforeor notepad ++ - Windows)deployment
Directions
- Make an empty Fileset with a script that runs at activation.
- Use this
code as anexampleof howscript to hideadminseligible local admin accounts atlogin,login andalsoshow the "other.Other..." optionatso authorized admins can still sign in with a username and password. This example uses Apple's loginwindow Hide500Users preference, so test it with theloginwaywindow to still use theyour local adminaccount.accounts are created before broad deployment.#!/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
adminsthose accounts at the login windowagain.again,Send out:deploy:sudo defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool NO