How to unlock a Mac if you’ve forgotten the password

Worryingly simple to do, when you know how.

It can be a nightmare if you lock yourself out of your Mac, and it can be really easy to do as well.  In fact there’s a well known occurrence where upgrading from Panther to Tiger would lock you out of your account with seemingly no way to get back in.

Of course, that was a long time ago now, but there are still plenty of ways to lock yourself out, or to simply find yourself with a locked machine.  However, it’s worryingly simple to get into a Mac where all of the user accounts are password protected.

All you have to do is “Trick” OS X into thinking that it’s just been installed.  This will then allow you to create a new user account (and password) with administrator rights.

Once you have access to this account you can reset the passwords on any other locked accounts on the system, or just delete them (if you don’t care about any documents that are held under that user account).

To trick your Mac, simply do the following:

  • Reboot your Mac.
  • Hold down the Apple+S keys on the keyboard (Command + S on newer Macs).
  • Your Mac should then boot to a command prompt, enter the following commands:
    • mount -uw /
    • rm /var/db/.AppleSetupDone
    • shutdown -h now
  • Your Mac will now turn off, turn it back on and it’ll run through the original setup process from when you first bought it, including allowing you to setup a user name and password.
  • Run through the setup stages and then login to your new account using the details you just provided.
  • From here you can access “System Preferences” and unlock the other user accounts on the system by resetting their passwords.

Job done!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply