2

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

1
  • Are you looking at the FileVault pre-boot screen or the actual OS is booted, account log in screen? The commands you mention work on the latter, Mojave and Catalina.
    – bmike
    Commented Jan 6, 2020 at 0:06

1 Answer 1

2

The trick still works in Catalina:

  1. Log out as admin (below "admin" is meant as name of the admin user account - adapt accordingly) and login as foo.
  2. Open the Terminal and enter:

    su admin
    sudo dscl . create /Users/admin IsHidden 1
    
  3. 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
    
  4. 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:

  1. Log out as admin and login as foo
  2. 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!

  3. 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.

4
  • I have FileVault turned on, is that the root of the issue? and is there a way around it?
    – j4zzcat
    Commented Jan 5, 2020 at 23:30
  • @j4zzcat Yes, that's the root of your issue...but I may find a (dirty) work-around. You would have to remove "admin" from the FV enabled users probably - don't test this though! I will test it in a VM later.
    – klanomath
    Commented Jan 5, 2020 at 23:35
  • 1
    @klanomath But that wouldn't just hide the admin account, it would mean than the user account would be the only one that could start the system. Commented Jan 6, 2020 at 7:11
  • @GordonDavisson True - I don't recommend to remove the admin account from the FV users. On the other hand: the average "unadministered" Mac (encrypted) looks like this - with an admin user though.
    – klanomath
    Commented Jan 6, 2020 at 11:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .