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. max gruenig says:

    hello,

    thank you very much for this very comprehensive advice. unfortunately i cannot manage to run the described process:

    after starting SystemStart

    the computer attempts to start apache web server

    “waiting for apache web server”

    obviously this fails, so there is a loop starting.

    the computer is an iBook G3
    with mac os x panther

    do you have any idea how to proceed?

    i would really appreciate your support, being unable to install any kind of software at this time.

    thank you very much,

    best regards,

    max

  2. Anna says:

    Hi Elliot…..After following the steps you listed…..I have two questions
    1. When I retreived the list of users it came back with this list:
    (all were in lower case)
    11 nobody
    12 root
    13 daemon
    14 unknown
    15 smmsp
    16 LP
    17 POSTFIX
    18 WWW
    19 EPPC
    20 MYSQL
    21 SSHD
    22 QTSS
    23 CYRUSIMAP
    24 MAILMAN
    25 APPSERVER
    66 MANAGER
    69 SACS
    73 AMAVSID
    75 APPOWNER
    77 CLAMAV
    79 JABBER
    81 SECURITYAGENT
    83 TOKEND
    85 WINDOWSERVER
    87 XGRIDAGENT
    89 XGRIDCONTROLLER
    Since I do not know the user name, am I supposed to pick any name from this list?

    2. I tried just picking a name and then followed the directions to change the password. When the second prompt came to retype the password, after typing it and hitting enter it comes up “Sorry”. then the screen turns blue leaving single user mode and needs to be restarted.

    Any ideas or tips on what I may be doing wrong?

    Thanks in advance…….Anna

  3. Roderick says:

    For the user who are new to Mac G3 and G4, the little key next to the spacebar that looks like a flower…is the Command Key. I have OS-X Tiger aka 10.4 and this worked for me. I needed to change my Admin Password..this is what I did….
    1.) Log on to this site http://www.westwind.com/reference/OS-X/commandline/single-user.html , it has good info on different OS.
    2.) Power up while the Command and “P” buttons down
    3.) Tyoe “/sbin/fsck -y”
    4.)Then “/sbin/mount -uw /”
    5.)then “sh /etc/rc” a lot of stuff will print on the screen, the prompt may or may not return, if it does nt, press to get the prompt back then type “passwd [username]” it will ask to enter it again after that type reboot. That should do it. good luck

  4. Paul says:

    i done all of the above but when it says changing password it comes up with a sorry comment,,,please helpppppppp before this laptop goes through the window =D

  5. curt says:

    aquired an iMac(found in the trash) it works but needed to figure out admin passwd have tried the things on your website and so far I have wiped the passwd that was on it and can’t even change the date and time. it has osx 10.3 any more ideas.

  6. abad says:

    hi could somebody please tell me were i can find the command-s key? i think the command key is the one with the apple on it but what about the s key? its for a ibook g4 i want to reset the password, thank you

  7. abad says:

    Found the key but im haveing the same problem as paul its keeps come up as a sorry comment…….help me please. i have done what rod at 104 told me do.

  8. Meagan Hess says:

    Here is a link to completely get rid of the admin account and start over fresh to make a new one.

  9. Apolo says:

    The problem that you have is of very easy solution, they should place the CD 1 of the installer of the OS-X 10.3 or plus (I have not verified the previous versions) and setupr the Mac so that it starts up from the CD. When the installer is loaded in the menu of the one there is an option that executes the utility of changing password the one that will allow them to change the password of the root or of any user without problems

    Greetings Apollo

    PD Excuses my basic English I am user of Hispanic speech.

  10. Brandon says:

    Any one have any luck with oc 4.2.2???? or whatever it is??

  11. Brandon says:

    10.4.2 i mean—

  12. Michael Glazier says:

    this mite help in this command:

    passwd [username]

    if the user name is 2 words such as joe blow when you type it in it must be one word so when you type it inot the command it would look like this

    passwd joeblow

  13. Andrew says:

    Ok, I followed the first steps and I can reset the root password, but when I reboot I can’t login because I don’t know the username, I am confused about how to list the usernames and which name to change

  14. AP says:

    “/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”

    WORKED! OS X 10.3
    Thanks to all who contributed.

  15. mel says:

    hi i have forgotten my master password! i followed your steps but it would help if i new what ‘command-s’ is. please could you help me. I have pressed enter n then s nothing happens, i tried caps lock and s but nothing happened. please help me and write back or email me would be better at [email protected]. thank you.

  16. ianio says:

    point 16 worked a treat for me thankyou all. i will write it down next time i use a secure password.

  17. Ashley says:

    I have a os 9.1 mac ibook. I forgot the password and I tried this step by step instructions. But I run into problems with the first step. I don’t have a “Command-S” button. What should I do?

  18. Jay says:

    I have a G4 and i dont remember the admin. password so i am tryin to change it or somethin because i need it.
    Ok everythin worked for me with this format:

    # /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

    But… after i type passwd[username] it ask for the new password so i put it and after that i have to retype it but once i retype it it keeps sayin “sorry” can anyone help me. thanx

  19. Domonic says:

    nothing works for me not even /sbin/fsck -y help please [email protected]

  20. Josh says:

    Help….my iBook g4 model PowerBook6,7 will not respond to the first command but it wants /sbin/fsck -fy instead for the first command? Is this a different OS X version? After that it will not take any other commands as offered above?? No I don’t have the start up disc but thanks for asking ha ha ha any help?? Thanks….J

  21. BSB says:

    I have a PowerBook G4 (that is now just over 1 year old and has not yet been used due to password problems and the installation DVD corrupted on “Password Manager” !

    I have OS 10.3.3 installed with a French AZERTY keyboard (running in root mode in US configuration. I have followed the various different advices above. I get as far as “Startup complete” after typing “SystemStarter”.
    I have then typed “passwrd root” and get the message “-sh: passwrd: command not found”
    I then tried the extended “passwrd -i …. routine and got the same message.

    Any more ideas ? (I would like to use my Mac before it becomes a museum piece rather than my PC !

  22. BSB says:

    Dear moderator, please ignore the previous post, I’ve just noticed on a further check that the command is “passwd” not “passwrd” !

  23. focus says:

    how do i know what modal my ibook is

  24. macuser says:

    There is no Command-S “key”.

    There is a Command key (the cloverleaf next to the spacebar) and there is an “S” key.

    Hold the two keys down together—that’s what the hyphen between them means, that they are held down at the same time just like when you use Command-X to cut and Command-V to paste when you’re in a word processor.

    And to Anna, message #103, DON’T go picking out names from a list and trying to change their passwords. Many of these are system things you shouldn’t touch. You can REALLY screw things up in root mode in UNIX, so don’t mess with anything or randomly try stuff without reading about it and understanding it first.

    If you want to know which users are listed on the system with accounts, then look at the Users folder. Usually there’s only one person if it’s a single user machine. It gives you the system “short name” for the user. For example, if you logged in normally as Jane Doe the short name is probably “janedoe” in the Users directory.

  25. JD says:

    I have a G4 Mac OS-X 10.3.9 and i’m having problems resetting my root password, i have gotten as far as “/usr/libexec/register_mach_bootstrap_server/etc/mach_init.d” but the reply is -sh:”/usr/libexec/register_mach_bootstrap_server/etc/mach_init.d is not a directory
    any suggestions pls!!

    Comments are now closed. Continue discussion here