Hide a user account from the login screen of macOS Catalina
Solution 1:
The trick still works in Catalina:
- Log out as admin (below "admin" is meant as name of the admin user account - adapt accordingly) and login as foo.
-
Open the Terminal and enter:
su admin sudo dscl . create /Users/admin IsHidden 1
-
If you want to remove the login screen's "Others..." option, which appears after disabling the admin account, enter:
sudo defaults write /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED -bool FALSE
-
To reverse the hidden admin user and enable "Others..." again enter:
su admin sudo dscl . create /Users/admin IsHidden 0 sudo defaults delete /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED
Tested in a Catalina VM. This might not work for T2-equipped Macs and definitely not if FileVault is enabled.
To remove the user admin from the login screen on a filevaulted Mac you can simply remove this account from the FileVault enabled users:
- Log out as admin and login as foo
-
Open the Terminal and enter:
su admin
List all users to be sure that user admin and foo are FV enabled:
sudo fdesetup list sudo fdesetup remove -user admin
After removing admin only one user is left to unlock the system volume!
-
To remove the user admin from the intermediate login screen (i.e. volume still unlocked and after logging out as foo)
su admin sudo dscl . create /Users/admin IsHidden 1 sudo defaults delete /Library/Preferences/com.apple.loginwindow SHOWOTHERUSERS_MANAGED
Use at your own risk! Tested in a Catalina VM. This might not work for T2-equipped Macs.