MacOS – Password no longer works on MacBook Air Yosemite 10.10.2 I need to reset the password, without logging in

macospasswordterminal

I do not know why, but my password is no longer working on my MacBook Air v. 10.10.2 Yosemite. I have tried several things including restarting in Recovery Partition, going to terminal and typing "resetpassword." This does pull up the standard screen that allows me to change the password, but then the volume containing the user account never shows up, which means I can't select it to change the password. I have also tried the older method of deleting the /var/db/.applesetupdone file through terminal, but it seems this file doesn't exist for v.10.10.2. I've looked at the Installer Log, and some things I noticed are "keyboard layout identifier -16899 has been replaced with -28673" and other related messages, as well as "Can not connect to /var/run/systemkeychaincheck.socket: No such file or directory", and "Could not read prev-lang:kbd to set keyboard". I don't know if any of these messages are related to the problem.

Best Answer

Note: I'm not able to test this so I don't know if a backup will reintroduce the same problem. Also note that this is more of a blunt instrument approach

Firstly, I can't speak directly to the terminal logs. Someone may have a more sublime approach using that information.

If you have a Time Machine backup, you can reinstall OS X following these instructions (from this page). Once a clean Yosemite install is ready, you can migrate your user settings and data using Time Machine.

Clean Install OS X Yosemite

It’s time for a clean install. We’re going to show you how to do it without using a USB drive, which makes it much easier and less confusing. So to start, you should download OS X Yosemite from the Mac App Store. Once it’s finished downloading, it’ll immediately load up on your screen. Follow the instructions to install OS X Yosemite. Once it’s done, it’ll ask you to restart your Mac. Do it, and once it’s loaded up, we’ll start the clean install process:

  1. We’re going to restart your Mac again. But this time, hold down Cmd+R. (Keep holding it down while it restarts, do not let go)
  2. Now, your Mac should load a screen with a few options (you can let go of Cmd+R now).
  3. Select the Disk Utility option.
  4. In the window, at the top of the left bar, select your Mac’s Main Drive. It should be something like MainHD.
  5. Now, select the Erase tab, located next to the First Aid button at the top-center.
  6. Near the center of the window, select the Format drop-down list and select “Mac OS X Extended (Journaled)” as the type.
  7. Click Erase (this will erase your main drive!) and allow some time for the drive to format.
  8. When it’s finished, close out Disk Utility and select “ReInstall OS X” from the menu. It will ask for your Mac App Store password to redownload OS X Yosemite. Give it a minute to do so.
  9. A new window should pop up and OS X Yosemite should begin to install. If it does not, press back and enter your password again.
  10. Once again, follow the install instructions and enjoy your newly clean-installed OS X Yosemite.

At this point, you'd migrate your Time Machine backup, and fingers crossed, you will have cleared the password problem.