Is it possible to hide an account from the login screen where you can see all the users?

I've got a Mac mini for temp/freelance staff to use while they were working in the office.

After a few years there's quite a few accounts on the Mac mini which are no longer required.

I don't want to delete them as there may be useful data in there, but I don't have time to do a full check/audit.

Is it possible to hide an account from the login screen where you can see all the users?

The mac mini is running macOS Sierra.


sudo dscl . create /Users/username IsHidden 1

Replace username with the username of the user you wish to hide.
To unhide the user, replace 1 with 0.

You can still log in as a hidden user by pressing ⌥↩︎ on the login screen, then entering the username and password.

Additionally, you could delete each account and leave the home folders alone. Changing the permissions to let your user read them is pretty straightforward an if you ever want the other users back, add the same short name and system preferences will give the user back permissions on their home folders again.