Tried to reset password in utility terminal but no users found?

I went to log onto my Mac before but the usual login had changed to “other” when I clicked it, it gave me the option to put in my username and password but didn’t recognise either (I couldn’t remember my username because it never asks) it wouldn’t give me the option to access other users so I tried to reset password through utility terminal but it didn’t give me the option. It just came up blank. No users to pic from. Totally stuck.

iMac 27″, macOS 10.12

Posted on Jul 18, 2020 4:20 PM

Reply
5 replies

Jul 18, 2020 7:13 PM in response to Zoomdweebie88

I've encountered a macOS bug where a user account will disappear. If there is only one user on the system, then macOS will provide the "Other" option for manually entering the credentials. If you are encountering the same bug, then you will need to trick macOS into running Setup Assistant again so it will create a new admin user account for you. Once another user account is created you should be able to log into the original user account.


To create a new admin user will require you to boot into Recovery Mode and launch the Terminal app from the Utilities menu. Then you need to verify the name of the boot volume and use this name in a command to delete a macOS system file which will force Setup Assistant to run the next time the computer boots. It is possible you may need to temporarily disable System Integrity Protection (SIP) in order to delete the system file.


Disable SIP:

csrutil  disable


Review the mounted volumes to confirm the name of the boot volume. The default boot volume is "Macintosh HD" unless you changed it at some point:

mount  |  grep  -i  volume



Now delete the hidden system file so macOS will run Setup Assistant the next time the computer boots making sure to replace "Macintosh HD" with the actual name of your boot volume if it has been customized:

rm  -i  "/Volumes/Macintosh HD/var/db/.AppleSetupDone"


You will prompted to type "y" or "n" for "yes" or "no" to confirm if it is Ok to delete the ".AppleSetupDone" file.


Now re-enable SIP:

csrutil  enable


Now reboot the computer and if the ".AppleSetupDone" file was successfully deleted you should be greeted by Setup Assistant. After completing setup you should now be able to access your original user account. You will need to keep this extra user account around until Apple actually fixes this bug.


Your other option is to restore from an earlier backup from before this issue occurred.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Tried to reset password in utility terminal but no users found?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.