IMac – How to reset the admin password without a working screen


I know that there are many threads about resetting/retrieving an admin password, but bear with me please and I'll explain why they don't work for me.

I recently moved in to a property only to find that the previous tenant had left behind a mid 2007 iMac – great, right!? No. The iMac works… as a CPU. The screen has been smashed up and has only a faint light emitting from the lower left corner so I have had to resort to buying a Mini DVI to VGA (which works perfectly as I'm currently on it on a guest account). This is where it gets a bit more complicated though. I wish to reset the iMac, but cannot without using the UIs accessed through reboot – when I access these (CMD+R, CMD+S, etc.) the external display isn't recognised so I go completely blind as to what is happening. I have read a few threads that say resetting an iMac is complicated, so I have thought about just creating myself a new administrator account, deleting the old one and all of the files with it – but without the old admin password, I can't do that – again, all threads resort to UIs accessed via reboot which I can't VISIBLY access…

So how can I reset the admin password without a working screen?

Best Answer

Simply create a new admin account by reinitiating the OS X Setup Assistant:

Boot to Single User Mode by holding S on startup with the external display attached.

Wait a few minutes and then enter ("blindly"):

mount -uw /

wait a second or two and then enter:

rm /var/db/.AppleSetupDone

In Single User Mode the US-en keyboard layout is used. If you have a non-Apple or a non-US-en Apple keyboard you have to adapt the input.

After the restart the OS X Setup Assistant opens and you can configure your Mac. Go through the steps of creating a new admin account.

After logging in on the new admin account, go to the Users & Groups preference pane. Select the old account(s), press the minus button for each and delete all files associated with them.