Reference

Can’t Log in to Your Mac? Create a New Admin Account

It happens to all of us, forgetting your password is easier than you think. In my case, I had an old MacBook that I hadn’t used in probably 2 years or so. None of my usual password worked and so I was left with either trying formatting the drive and reinstalling the OS or trying to reset the password by using my Apple ID which I also had issues with at the time. I wasn’t interested in reinstalling the OS so I found an alternative to resetting my password. It’s actually quite simple. The process goes like this; create a new Admin account, use the newly created Admin account to change the password of the locked out account, login with the locked out account using the changed password and then delete the new Admin account.

Just use the below steps.

  • Boot your Mac into Single User mode by holding down the Command + S keys when starting up your Mac.
  • You’ll see some scrolling lines of text at the end you’ll see the command prompt which looks like this “:/root#”
  • At this point we need to mount the startup drive so we can access the files using the command /sbin/mount -uw /
  • Now we make OS X think that it is the first time you’ve ever used this Mac by deleting a file using the command rm /var/db/.AppleSetupDone
  • You can now reboot your Mac by issuing the Reboot command

After your Mac reboots you’ll have to go through the prompts as if the Mac had never been setup, creating a user and password, etc..

Once you’re logged in you can click on the Apple in the top left and click on Preferences.

From there you can go to User Accounts and then click on the lock to unlock the settings, you’ll be prompted for your password.

At this point you can click on the account that you’ve forgotten the password for and then click on Reset Password.

Logout and then log back in with your old account using the password that you just reset.

That’s all, oh and by the way, this only works if FileVault hasn’t been turned on.

Tagged , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *