DISQUS

Tech-Recipes: Mac OS X recover lost root password | Apple Mac | Tech-Recipes

  • Anonymous · 3 years ago
    1. boot computer and hold the "apple" key and the "s" key.
    2. wait for terminal show
    3. release keys
    4. type without the quotes: "/sbin/mount -uaw"
    5. press enter
    6. type without the quotes: "rm /var/db/.applesetupdone
    7. press enter
    8. type without the quotes: "reboot"
    9. press enter

    this will let you create a new admin account when you reboot your computer.
  • emilymcg · 4 months ago
    Thank You!!! You are our hero! This saved us such headaches! Our computer will not be a paperweight! Good luck to everyone!
  • Joel Garfield · 4 days ago
    This was very helpful. Thank you. I forgot the password to my old iMac, lol. Thanks again.
  • check · 3 years ago
    im having this problem...im stuck on a non-admin account and I lost my admin password...on top of that...my disc drive doesnt seem to work...and my os x disc will not boot from my external dvd drive....
    what can I do?
    thanks
  • miamiman · 3 years ago
    Hello, I recently bought a apple g4 laptop , and do not have the password to unlock ....what can I do as I do not have the reinstall disc to boot from? Also, do i type in "sudo passwd root' or "passwd root" only? Thx very much. I enjoyed discovering this site...
  • qmchenry · 3 years ago
    Do you have the password to an account on the system that is an administrative account? Only those accounts can use sudo (which is quite the cool, recipe-worthy command when I or someone else has the time). Sudo is essentially a way to prevent users from having to become the root user to do root user activities. Many people tend to log into unix systems as root with all the gui weapons -- I mean tools -- at their disposal, ready to wipe out their system. It's a nasty habit, one which makes a unix system one step closer to a windows box. Speaking of boxes, I'll get off my soap one now..

    If you have an account that is privileged (can use sudo), and there can be several on a system, then you can login as that user and use the sudo passwd root command. The password it will ask you for is the current, privileged user's password. Then it will ask for the new root password twice and you should be set. If you do not have an administrative account, let me know.. there are other ways....

    Q
  • qmchenry · 3 years ago
    This worked for me on 10.3:

    Restart the system (Apple menu -> Restart)
    Hold down Command-S while restarting -> lots of white on black text
    From the command prompt issue these commands:

    mount -uw /
    /usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
    netinfod -s local
    SystemStarter
    passwd root



    I believe that in some other versions of OSX, the second and third steps are not required because SystemStarter configures networking in those versions. In 10.3, several services will not start without active networking including opendirectory which stores the passwords.

    If you get to the command prompt and run 'passwd root' and it sits for 10-15 seconds and then returns to a command prompt, this is indicative of a timeout waiting for connection to a service that is not running. If you didn't do all of the steps above, try them in that order and see if that helps.

    Q
  • check · 3 years ago
    thank you for your help...going to try it now...but even if it doesnt work I appreciate it greatly!
  • check · 3 years ago
    the SystemStartup seems to freeze the computer while searching for something called "ARDAgent.app"
    not sure what that's all about
  • qmchenry · 3 years ago
    Sorry that didn't work.. what version of OS X are you running? There should be a way to prevent that service from starting. There may also be an easier way for your specific version.
  • cbk · 3 years ago
    Same problem....stuck on a non-admin account, lost admin password....disc drive not working.......OS X will not boot from external dvd drive.....we are using Panther not 10.3 - will those instructions still work? Thanks.
  • asp · 3 years ago
    How do I check which version of mac os I have? I am really new to mac sorry, I have the same problem. For me when I sent in my powerbook for repairs, it returned with a changed admin password.
  • davak · 3 years ago
    I'm not an apple guy, but this seems like a great recipe!!!

    If you want to post it as a new recipe, I'll run it by our apple moderators and see if we can get you a fat amazon gift certificate reward!
  • Anonymous · 3 years ago
    This does not "recover" anything; it would be more appropriate to say it "resets" or "changes" the password.
  • Anonymous · 3 years ago
    i have ibook g4 bought it off of ebay the user is no longer a registered user so i cannot contact them to get the password so i bought a new os it is 10.2.4 when i start and try to reinstall it says i need the password i tried taylors way and qms way neither would work i know i done taylors way correct i know but i dont know about qms tell me if this is correct
    hold apple button by the spacebar and s upon boot
    type mount -uw / enter
    type /usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d enter
    type netinfod -s local enter
    type SystemStarter enter
    type passwd root enter

    is all this correct


    im wanting to delete everything and install this new any way possible
    i appreciate any help i can get if there is anyone willing to talk me through this i might slide a little dough there way hit me up robertseber@yahoo.com any time thanks
  • Anonymous · 3 years ago
    it currently has mac os x 10.4.6

    sorry i am new to a apple
  • Anonymous · 3 years ago
    it currently has mac os x 10.4.6

    sorry i am new to a apple
  • Anonymous · 2 years ago
    The command s/mount/rm/reboot sequence worked perfectly on osx 10.4.8

    OSX filenames are case sensitive, and the file on my machine was:
    /var/db/.AppleSetupDone
    :D
  • Anonymous · 2 years ago
    Hmm i tried the "passwd root" command and at the end it came up with NetInfo write failed: Remote system error. Any ideas on what to do?
  • Anonymous · 1 year ago
    <ul id="quote"><h6>taylorchase wrote:</h6>1. boot computer and hold the "apple" key and the "s" key.
    2. wait for terminal show
    3. release keys
    4. type without the quotes: "/sbin/mount -uaw"
    5. press enter
    6. type without the quotes: "rm /var/db/.applesetupdone
    7. press enter
    8. type without the quotes: "reboot"
    9. press enter

    this will let you create a new admin account when you reboot your computer.</ul>

    These are great instructions, thanks! This just worked for me!
  • jason myers · 1 year ago
    this not only worked on the password problem but i never had to reload any programs thanks a million!!!!
  • Manda · 11 months ago
    Will this work with filevault active?
  • rex2930 · 11 months ago
    I realy need your help i am getting frustrated badly step 1 to 5 works fine but when i try to do step 6, is says the following rm/var/db/ : no such fle or directory wth am i doing wrong Please write back ASAP
  • thomas bowen · 1 year ago
    Daughter has only one account on Mac and doesn't remember her password. I can't load any new software. Any help? I tried the sh /etc/rc then passwd username it prompted me for a new password. I typed in the new password but nothing actually typed. It asked me to repeat it (even though nothing actually appeared) I typed in what I had the first time typed in reboot and after it rebooted, I went to daughters account tried to get in, but it said we didn't have the right password. A little help would be nice. Thanks
  • Nikki G. · 1 year ago
    OK I have a MAC OS X
    Lost password
    NO administrator account
    Only One
    Can't find software
    HELP
  • kathy · 1 year ago
    Wow thank you so very much! It worked the very first time!
  • les · 1 year ago
    i lost my disc.s for back up and for got pass word to get in to my mac g4
  • jB · 1 year ago
    Bad Title!
    In no way does this recover the lost password!
    It is useful for resetting the password.
    Important difference.
  • Ad · 11 months ago
    Hi Can anybody help me? I couldnt remember my password to my ibook so i used this 1. boot computer and hold the "apple" key and the "s" key.
    2. wait for terminal show
    3. release keys
    4. type without the quotes: "/sbin/mount -uaw"
    5. press enter
    6. type without the quotes: "rm /var/db/.applesetupdone
    7. press enter
    8. type without the quotes: "reboot"
    9. press enter
    which worked great but when i got into my ibook everything that was on it had dissapered!! can anybody tell me how i can get the photos and music back that is on the system somewhere my hard drive is only showing 5 gig available and im about 9gig missing if somebody could tell me how to access these files i would me most gratefull Thanks
  • rex2930 · 11 months ago
    how do u no wth version of Mac Window base do u have i currenly los my passwork and my master password but tried everything wth u guys had down there Mac OS X 10.4 but do u do that if u cant get into your on Mac
  • keef · 10 months ago
    thank you very much, your instructions worked a treat.

    i was trying to delete some files that were locked and hidden inside an app. v frustrating for a control freak like me. now very happy your simple instructions allowed me to change the root password, which i had forgotten. still wondering what it was... ???
  • Mohit · 9 months ago
    Thanks a lot . i helps. I was able to change my password. I am really new to mac and linux, so dont know so many commands
  • eliza6226 · 9 months ago
    I have a Mac Mini with OSX 10.5.6.

    I have an admin password, and used your recipe to obtain another root password. However, when I try and log in the a new terminal window with the new root password it says "unknown command"

    What have I done incorrectly?
  • Matt · 7 months ago
    If my MAC is stolen how does this prevent anyone with a leopard disk from recovering my password for my file vault account?
    ie: change root password, then change account password, then login, and steal company files?
  • Erkan · 7 months ago
    Hi I can not acces command s . And forgot password and master and don.t have installation cd. Is there any diferent way ?
  • thomas · 7 months ago
    i just baught this cpu and i dont have the cd but there is a password on it that i dont know what it is every time i try to download any thing it asks for it but i havent the foggiest. if any one knows how to get rid of this or knows any thing about these cpus please help im now ofically lost. please help me
  • Joe T Lor · 6 months ago
    I can not start my G4 lost the password OS
  • Shiv · 5 months ago
    well this is quite a simple one and might not work for you, but if you have any other account on your mac( admin) then you can simply
    1. go to system preferences
    2. select the user from the left sidebar
    3.click reset password.
    4. it will ask you for a new password.
  • in2town · 5 months ago
    it is good to know that you can get advice, i recently lost my password so i will try this and see if it works
  • SK · 5 months ago
    I want to reset password on my mac. Today morning it asked me to login with user name and password, it never asked me admin password. I entered the correct password but it is not working. I tried to reset the password and hint using OS X disk, but it still not accepting my new password. I can see the password hint changed, but whenever I try to do some administrative task, it will ask me admin password and reject it. Please help me to solve this issue. I can login to my account using OS X disk but when I will enter my admin password to do some administrative task it is rejecting my password.
  • carlos · 4 months ago
    where do i type that? whats the sudo comand?
  • lewisj · 4 months ago
    Hi everyone,

    I tried to reset password via....

    1. boot computer and hold the "apple" key and the "s" key.
    2. wait for terminal show
    3. release keys
    4. type without the quotes: "/sbin/mount -uaw"
    5. press enter
    6. type without the quotes: "rm /var/db/.applesetupdone
    7. press enter
    8. type without the quotes: "reboot"
    9. press enter


    But now it just comes up with a select language page and when I choose english it loads up the System Administrator account. I can not log in as anyone else even if I create new users. In this state I try to log out, shut down etc, but nothing happens. Does anyone know what has happened here. Help is so so appreciated.
  • George · 3 months ago
    I need to reset my administrator password on my mac. I have followed instructions according to the apple website but it doesn't work. When I attempt to open the install disc on the computer it asks me for the password. Kinda defeats the purpose, I don't know the password. Is there anyway around this or am out of luck.

    Please help
  • grantrob · 3 months ago
    I recently bought an iMac G3. Ido not know the password. I am using a windows keyboard. When I boot m mac the windows + s has no effect! If you can please help me that would be great.
  • drewgost · 3 months ago
    After you type the above commands and reboot I notice that the white screen shows up for 30 seconds then boots into original user. I never see the prompt I just type the commands but never see any typing but it does reboot when i hit enter I am using an external screen.

    Am I supposed to enter a password when the white terminal screen shows up?

    Please help
  • williamsr · 2 months ago
    i have a imac with 10.5.8. i just bought an old imac g3 with 10.3. i dont have the passwords for the g3. i have taken the hard drive out and connected it to my new imac. but i still can not change the passwords on the hard drive. is there a way to do this.
  • Mike · 1 month ago
    Worked like a charm! Thanks!
  • Noxious_sully_dolor · 3 weeks ago
    IT WORKED
    U THE MAN
  • robfluth · 3 weeks ago
    I have downloaded windows password key 8.0. It is a very quick and useful utility for resetting passwords. It not only supports XP, 2000, and NT, I have personally tested it with Vista Home Premium and Ultimate. It works perfectly to reset any local user account to a blank password.
    Just an easy to use bootable CD/DVD . It can also be used on a USB Flash Drive. http://www.lostwindowspassword.com/
  • deer1 · 3 weeks ago
    hm...interesting...