Mac OS X Password Recovery

Instructions for the Mac OS X Password Recovery.

Although there’s no real way to recover a lost root password, you can change the root password even if you do not know the current one. You must have physical access to the machine in order to accomplish this task.

1. Click Restart at the login window

2. While the computer is restarting, hold down “Command-S” until you see text scrolling through the window. This boots the computer into single user mode.

3. At the Localhost% prompt type:

/sbin/fsck -y
/sbin/mount -uw /
/sbin/SystemStarter

You will then see various services starting up.

4. When the Localhost% prompt reappears, type:

passwd [username]

It will then ask you to type the new root password twice, so do so.

(Though I’ve not tried it, it appears you can type niutil -list . /users to get a list if users if you do not know the username….if someone wants to verify this, I would be most appreciative).

5. After entering the new password, type:

reboot

6. At the login window, enter the username with the new password. Once you are logged in, you can use the Multiple Users application (/Applications/Utilities) to change your user’s password, or create a new user account.

Note: this may not work for newer versions of OS X; I think they did something about it in a security update.

130 Responses to “Mac OS X Password Recovery”

  1. Ian says:

    I’m running 10.2.8 and had a problem after typing /sbin/SystemStarter. Everything loads up until there is an error which is:

    sh-2.05a# Unable to load localization strings for /Library/StartupItems/KeyAccess
    Starting KeyAccess
    Aug 6 13:18:31 localhost SystemStarter: /Library/StartupItems/KeyAccess
    Startup complete.
    localhost crashdump: Crash report written to: /Library/Logs/CrashReporter/karl.crash.log
    localhost last message repeated 5 times

    And then it just hangs. Any ideas? All I need is the username, I know the password. Is there a standard root or admin username that I could use with my password? Thanks.

  2. kyle says:

    thank for the instructions. But i have one question what is a “Command-S” key, and were it located at…? As u might aready know i’m too new to mac os x sys.

  3. DSTER says:

    just boot from the osx disk and clik reset password from menu… much easier.

  4. sysadmin says:

    i dont remember my admin password.

  5. clint says:

    using 10.4.1 and i have gotten to the point where it will ask me to change the password by typing passwd -i file root but when i reboot machine password is not changed

  6. Kay says:

    I have a 10.3.3. this doesn’t seem to be working. Can anyone help me?

  7. Kay says:

    niutil -list ./users doesn’t work for me either.

  8. Chaz Brown says:

    I have an even stranger situation here, it refuses to enter single user mode at all, it goes straight through to the login screen no matter what.

  9. milee says:

    hi, i have a question, i have OS 9 . i forgot the password,and can’t login. can someone help me. i don’t know what the command and option key is. i have an old apple-ibook.

  10. Shala says:

    I have followed the original instructions but after I do SystemStarter, it goes through all the scrolling then just says “Startup Complete” What do I do from there?

  11. Camaraderie says:

    I am a biomedical researcher, and when the hard-drive on my laptop recently failed due to a mechanical malfunction, I lost almost one-year worth of valuable data. Estimates for recovery were in the range of US $800-2500. I downloaded multiple do-it-yourself data recovery program. one of them is Stellar Phoenix Data Recovery Software & Services.Please give ur view regarding this software…

    thank you
    Data Recovery Software & Services
    Recupero di dati
    Datenrettungs software

  12. tammolives says:

    nebody treid niutil-p ???

  13. Jamie says:

    Hi. Do you know how I can retrieve a host user password on an ibook mac os 9.1 or get rid of it and cancel the multiple user option? the host user is the only one that has access and control.

  14. dante says:

    I just received a free imac. When it boots it comes up with OS X logo and has two log-ins (localadmin and Print User). I have no idea what the usernames are. Can I use the above? It also didn’t come with any discs or anything.

  15. shaun says:

    ok heres my problem, i got this computer off ebay
    ibook g4 with charger
    theres administrator passwords and names needed for alot of things and i cant get on them

    there is no logon screen it just goes straight to desktop after starting up

    when i do the above i get after the syster starter and it wont go back to local host

    HELP

    also if i buy tiger how do i clear the syster and install that

  16. Wade says:

    after I type in the password the second time, I get the error netinfo connection failed Remote system error SH-2.05A#

    Has anyone seen this b4?

  17. shaun says:

    i was able to change the root pass word finnaly after toying around but i do not know how to fidn the username i dot have to login but all my stuff is blaock by an administrator

  18. gvb says:

    On my Power Mac G5 running Tiger, I cannot get it to boot up in single user mode. I hold “command-s” but it doesnt work. Any help?

  19. justin says:

    i am trying to get through the username password and after i type the password the second time it says;

    sorry
    localhost:/var/db/netinfo root#

    please help i have been working on this for 5 hours

  20. ShaneR says:

    Hey i got this powerbook off my gf’s sister. The thing is that i dont no the user name or the passwd. I dont talk to thise b*****es no more. I cant do none of that shit, jus wont work. says User Root not found in file /ect/masterpasswd.root How do i reinstall this piece. Im not good with these macs?? I dont even have install cd!!!

  21. steveo says:

    hey guys i have a powerbook G4 and was wondering what the command-s button looked like and also if something goes wrong with me doing this can i just restart the comp and will it be fine? thanks

  22. Emily says:

    I never get the Local Host prompt. All it says is sh with a number, or something like that. (using someone else computer, so I don’t have access to mine to see exactly what it says.) Can anyone help?

  23. M says:

    Could you please give a complete step-by-step for the ntutil command? I have tried many permutations of it to no avail.

    Thanx

  24. ozzi says:

    i have a Power Book G4 laptop. I have tried every possible instruction listed on this blog and it dont seem to be working.
    Operating System is Mac OS X 10.3.9

    # /sbin/fsck -y
    # /sbin/mount -uw /
    # /usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
    # cd /var/db/netinfo
    # netinfod -s local
    # SystemStarter
    # passwd root
    # reboot

    This is what i tried what can i do ? password does not seem to be reseting to what i type in.

  25. David Rodriguez says:

    I have the same problem when even trying to get into the command s prompt. It will not give me any “text scrolling through window. It just goes to a screen that flashes a little folder icon with a mac logo face in it and flashes that with a question mark. :( please help anyone, would be greatly appreciated. This same thing happens when i try to boot from a Mac OS X Panther v10.3 CD i get the same screen at startup, it will not take cd, however it does read CD but when i clik install it says it needs admin password which i do not have. Is there some type of lock on my ibook >? THANKS TO ANYONE WHO CAN HELP :)P
    [email protected]