I have a Mac running macOS Catalina that has two users accounts, 'foo' and 'admin'. Both appear on the login screen. I'd like to hide the 'admin' account from the login screen.
The following tricks that used to work on earlier versions of macOS aren't working anymore:
sudo dscl . create /Users/admin IsHidden 1
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add admin