GigaOM Network: GigaOM | WebWorkerDaily | NewTeeVee | Earth2Tech | OStatic | jkOnTheRun | TheAppleBlog | NewTeeVee Live | Jobs | About | Advertise | Contact

Reset OS X Password Without an OS X CD

Written on June 22, 2008 by Jenny Kortina and 53 people have commented

I wrote about this a while back on my blog, hackaddict, but it was such a popular post I thought I’d give it a revisit. A lot of people buy used Macs, and they often run into the problem of not knowing the admin password, so here is a way to get around not knowing the admin password on Macs.

To reset your OS X password without an OS X CD you need to enter terminal and create a new admin account:

  1. Reboot
  2. Hold apple + s down after you hear the chime.
  3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
    • mount -uw /
    • rm /var/db/.AppleSetupDone
    • shutdown -h now
  4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and you’re good to go again!

Share This

Trackbacks/Pingbacks (Trackback URL)

  1. Pingback by St. Louis City Photos » Blog Archive » Reset OS X Password Without an OS X CD
  2. Pingback by Matt Castille » Blog Archive » Reset OS X Password Without an OS X CD | The Apple Blog
  3. Pingback by The Apple Blog
  4. Pingback by Cambiando la contraseña del administrador sin el DVD |
  5. Pingback by Reset OSX Password | MacNative
  6. Pingback by update « Brad’s Blog
  7. Pingback by Nueva cuenta de administrador en Mac OS X sin necesidad del CD | MacZana.es
  8. Pingback by kyleakoch.com
  9. Pingback by Matt Castille » Blog Archive » Reset OS X Password Without an OS X CD | The Apple Blog
  10. Pingback by Accede a un Mac sin la contraseña de root « Red Social de Noticias
  11. Pingback by How to Reset Apple Password without a CD | Apple | Information & Technology Secrets Revealed


Comments RSSComments

  1. #1 John says:

    So - it’s just that simple to hack a Mac OS machine if you have physical access? Are passwords basically useless then?

  2. #2 EW says:

    You fail to mention that in the process you delete ALL of your information.

    That is not resetting the OS X password, that is called creating a new account and taking over someone else’s computer with a fresh start. The title of this post should be changed.

  3. #3 Todd Baur says:

    Yeah this is a bad idea. Sorry, but removing that file will just trick OS X into thinking its the first time its been powered up, and take you through registration.

    So if you absolutely need to reset your password without an Apple CD available, you’re better doing this.

  4. #4 flysi says:

    Does this work if a firmware password is enabled? Cuz otherwise it’s a little disappointing to think it would be that easy to snag a computer and wipe all of its data, even if the owner, thinking he’s being all security-conscious, has bothered to enable a firmware password…

  5. #5 The Oz says:

    actualy no it does not delete the user account to do that you would have to do this

    rm -R /Users/Username

    The command simply deletes the prefs for the apple setup assistant and it could be another way to regain access should you not have your Install DVD. After running the command and rebooting youll be brought to the Apple Setup Assistant where it will allow you to create another admin user which in turn allows you to enable the root user and then regain access to your files.

    Resetting a firmware password is as easy as changing the amount of ram in the machine and them zapping pram, that takes care of any firmware passwords.

  6. #6 Honza says:

    >rm -R /Users/Username

    That removes the users home directory. It doesn’t actually remove the account from the user list.

  7. #7 Rick says:

    If you’re already going into single user mode, do it the right way

  8. #8 SHRIKEE says:

    mount -uw /
    passwd *username*
    reboot now

    Obviously replace *username* with the desired login name. If you don’t know it, go in to /Users and see which folders are available…

    cd /Users
    ls -a

    :)

  9. #9 /I3az/ says:

    @John

    All Personal Computers can be “hacked” this way. Even BIOS password can be got around by just pulling out the batteries!

    Thats why on the first Mission Impossible film u have the computer locked up in a secure room ;-)

  10. #10 The Tech Juice says:

    Awesome!

    I had no idea. I recently just reformatted a Mac. Had I known this I could have saved valuable time and effort.

    Thanks!

  11. #11 devious says:

    Hi i have a dual os mac with windows and mac how do i get to command line on the mac as when my pc reboots it loads up windows asap or if i keep hold of alt it gives me option to choose but then when i click on mac and hold apple and s it doesnt take me to command prompt

  12. #12 flysi says:

    @ devious: When booted into OS X, change your startup disk to the Mac HD in System Prefs > Startup Disk. When you reboot, it will boot into OS X by default (instead of Windows), and then you can boot into Single User mode.

    Oh, and using punctuation is not a bad habit to get into.

  13. #13 Nick says:

    This worked perfectly, thanks so much :D

  14. #14 Jason Rogers says:

    Awesome, will definitly write this down. Will come in handy. Great post!!

  15. #15 3G iPhone says:

    Excellent, I am printing this of mow. Will come in handy!

  16. #16 cs says:

    Hi,

    I tried this on my personal MacBook, which runs the latest version of Leopard and it worked exactly as advertised.

    I REALLY want to do this with my MacBook Pro from work, which runs Tiger 10.4.10. Can anyone confirm that this also works with Tiger?? I’m a little concerned about trying it on my work machine. I can’t make a true backup without Admin rights…

    If anyone knows if this works in Tiger, please let me know.

    Thank you!

  17. #17 antoine villalobos says:

    i tried everything thanx so much ur the best
    im am so happy

  18. #18 Laurens Bainton says:

    EW says:
    You fail to mention that in the process you delete ALL of your information.

    That is not resetting the OS X password, that is called creating a new account and taking over someone else’s computer with a fresh start. The title of this post should be changed.

    MY REPLY: by the way i did that to my mac and i got all the data back. The hard drive didn’t
    delete it

  19. #19 NJ says:

    …So i did what was said, before knowing there was notes beneath, and the mac sounds the mac chime during start-up. However, upon entering the OS screen, where its loading…it has a small folder icon, and flashing to Mac face Icon….Wont do anything, acts as if everything is wiped…which means I would need a CD. I dont have one…Any words…..Thanx

  20. #20 ModelBoi . . . says:

    Ok… Here is the Story… I have a Macbook SO X tiger… It was stolen 8 day’s ago… with all my stuff… including my battery, charger, CD and even my I-pod… I just got it back today… but the police told me the CD and ipod was no where to be found,,,

    Here’s my issue… They never found the guy… But The Theif stole my password and changed everything !!! He put his own password! …. Plus now I don’t even Have a CD to reset it!!!!! Can someone please help me hack my own computer?!…. Does this work for my laptop?… All my modeling stuff and info has been lost!… I use this for work!… Please… Can someone be of any assistance… (These past few days have been crazy…. sorry for the begging….)

    ModelBoi….

    I’ll check this from time to time…. Thanks…

  21. #21 ModelBoi . . . says:

    I will still be checking it from time to time… Any help would be appreciated . . .

    -Modelboi

    :]

  22. #22 none says:

    LOL thats not hacking! Im not even sure if its worthy of being called cracking. Who has a password on their machine anyway. I only keep one on my broweser to keep my friends from screwing around with my business stuff.

  23. #23 handsom1 says:

    ty m8!!!!
    helped a lot

  24. #24 Dyllen DjO says:

    Do as he says but upon the start up you will here a chime THE APPLE CHIME :)! Once that is done, you have a 3 second time period to hit Apple Command - s. This works on any COMPUTER using Mac OS X 10.4.0 - 11. You must hold both firmly not to tough to brake your keys just enough to let it know whose boss. A screen “WILL!!!!” Pop up and you must hold both of them down at the same time until that appears. Once it does you will wait about a minute then do as it says and Voila! It works and FOR ALL THE NAY SAYERS NO it doesn’t wipe your information say do not transfer anything, and nothing is wiped. Logon as the admin and put in your password and change the old admins privileges to standard and then change yours to admin settings then reset the password on the old one to something you will remember. Then log out and go onto the old one and ALL OF YOUR THINGS ARE THERE AND NOTHING IS DELETED I HAVE DONE THIS 20000 TIMES TRUST ME my company uses macs and so many people forget the password and it takes to much time to do this with the disk that its easier this way and nothing will be deleted if you just put in the information needed nothing more don’t transfer anything.

    Example -
    The old account let say was name. JoeShomo!
    Joeshomo forgot his password and doesn’t no how to get it back
    Reads this then says okay. Shuts down his computer, turns it on hears the chime 3 notes before the end hits Apple Command - S together comes to the text screen.
    Types in what it says and then reboots.
    Comes to the First time start up screen. Follows the instructions and doesn’t transfer anything “TRUST ME DONT TRANSFER!!!”
    Then names his new account FIXER!!!
    He Logs on to FIXER!!! and goes to Account Preference.
    Clicks make this computer an administrator! ” No need to put in any password here ”
    Clicks on the Lock if its locked which it will be if someone is secure with there computer.
    Goes to the JoeShomo account and clicks don’t allow administrator privileges.
    Then below the names and Short name, clicks reset password!!
    Change it to what ever you want that you will remember and finish up.
    Close the Account settings.
    Log out and go to the JoeShomo account don’t be worried your stuff is there!!
    And if your smart you will leave FIXER!!! account or whatever you name it!
    But if not then change it back and that does it.
    DON”T LISTEN TO PEOPLE THAT TELL YOU THAT IT WILL SCREW ANYTHING UP IT WONT ITS JUST A glitch that allows the computer to think its the first time starting up but doesn’t wipe the hard drive. Because it already has a OS. Just a refresher if you will.

    If that doesn’t help and you need more then that contact me at
    dyllenowens@ymail.com I will help you further!!!
    Any other problems contact ME WILLING TO HELP

  25. #25 Ryansway says:

    I’ve just tried this method several dozen times on an old Apple ibook 500 running 10.4.8 and it doesn’t work.

    The install CD method doesn’t work either as they are the original 10.2, nor does the restore CD method.

    So I tried this method using “Apple S” holding it down before, during, and after the chime, but no luck. Tried various intensities on the keys, no luck either.

    Any ideas?

  26. #26 HyperShadow5592 says:

    This Actually Worked!!! Thanx So Much!!! F.Y.I. I used this on a Mac OS X Panther Desktop.

  27. #27 Dave Johnson says:

    This reset procedure worked absolutely great! Thanks! It was a Godsend! Dave

  28. #28 Mark says:

    This method seems to work fine. To all those who tell you to use passwd - it doesn’t work in 10.3.x and above…

  29. #29 Ryansway says:

    I was able to get it to work, but only after pulling out the RAM and restarting the machine. It was the only way to get past the lock which prevented any of the hot key combo’s during start up. Once the RAM was out I had no problems using “Apple S” - that method should probably be included in this procedure for those encountering the same problem I did. Cheers!

  30. #30 Patrick Lewis says:

    Would this method also set the new admin as the owner. I mean to have a used computer transferred to a new owner (name, address, etc.).

  31. #31 Lena says:

    I tried this on my iBook G4 and it didn’t work. could anyone help me?

  32. #32 Patrick Lewis says:

    Thanks. This works BEAUTIFULLY. I am selling some old macs and used this to “Virginize” them. I did it twice on each machine. First to create a user named DeleteThis User. I used this new user to delete the original (my) user. And then did the reset again.

    Thanks a ton.

  33. #33 bobbler says:

    Pls i have tried all i could but i still dont get any of this. I need someone to help me out you can get me on my mail. authenticnelly@yahoo.com
    Its a version 10.4.10. Kindly help me with procedures on how to reset the password.
    Thanks

  34. #34 Patrick Lewis says:

    Be sure to type it exactly (including spaces and caps). Do each line one at a time, hitting Enter after each. I did this on 10.3 and 10.5.

    mount -uw /

    rm /var/db/.AppleSetupDone

    shutdown -h now

  35. #35 Mikey. says:

    I can’t believe anyone would actually go to a HACKING APPLE BLOG and then take the commands that the poster put on there and actually type them into the prompt. I learned that lesson back in an old AOL chatroom. I curiously asked the user where he got that cool ass rainbow font. He simply posted the link and “I” installed the backdoor trojan horse not knowing that It was exactly what he wanted me to do. Most peolple don’t remember the web when it was dangerous. God how I miss the sound of AOL 4.0 logging on to my dial-up modem. No disrespect to the poster. I see the point in having a blog like this but I just don’t think people see the danger in taking advice from a blog. If this guy said reformat your hard disk but he told you how to do it in code from a prompt so you didn’t know what you were doing you would probably do it blindly. I’m not saying that the code is incorrect that he posted. ( I ignorantly didn’t check into that.) Sorry poster. You sound like you know what your talking about so I hope you can understand I’m not attacking your blog. For all I know It’s good commands but I trust you as much as the rainbow font guy. That’s how everyone should trust what they read on a blog. I hope this works because I’m gonna try it either way because it’s not my laptop and I don’t care if it ruins my friends MAC. Yep you guessed it. I’m a PC.

  36. #36 Doug Young says:

    Mikey Said:
    “Yep you guessed it. I’m a PC.”

    And always, have been, that was obvious by line 4 of your post
    Even back then the Mac was all but immune from Trojans and Virus and clicking that link would have done nothing ;-)

  37. #37 Jason says:

    this does work. i just did it on a MBP running 10.5.5.

    after doing it, i kind of panicked and thought i had just deleted all of my data, but rest assured that this process does not.

    it will take you through your initial setup again, but all it does is create another account. your original account will remain.

    i would think that passwd [username] would have worked fine. i will retry that. it may save from having to go through the entire setup again.

  38. #38 Thomas Stricker says:

    > is it that simple to hack into a mac…

    yes, it is - but only if the mac is not specifically
    protected.

    This is not a security leak. It is by design and
    intentional, since most personal computers are
    what the thing is called i.e. a personal item.

    Booting into single user mode is a thing as old as
    Unix. I used the trick on Unix V7 - early 80ies.

    Most systems boot automatically using a standard
    boot command line invisible to the user. And most
    Unix including Mac OS X allow you to get into a
    manual mode and specify your own parameters e.g. -s
    to go to single user mode. In single user mode you are
    omnipotent root, can mount disks and change every bit
    on your system disk i.e. add new users, delete users
    etc…

    The trick fooling the system into an automatic
    initial setup script is one way. There are more
    traditional ways to reset password, like
    editing /etc/passwd in very old systems or
    nicl /var/db/netinfo/local.nidb… 10.5. needs
    an even newer trick which I don’t know/use yet.
    But such one will exist by design.

    If you want to prevent this you can get a utility
    (google for “firmware password”) and set a firmware
    password for the machine. You will set a variable in
    NVRAM of the machine and this prevents any key
    combinations from changing the boot parameters.

    The user of the machine is forced into a
    regular OS boot on the default drive and you
    loose the chance chance to intercept and
    walk into the machine through the boot door.
    That way you will end with the login prompt
    and be locked out if you are not a regularly
    authorized user.

    But again - if you have physical control over
    the machine you can remove the firmware password
    (by changing the memory configuration on most macs
    i.e. remove or add memory).

    Discouraging the manipulation of an operating
    system image always boils down to a padlock on
    the machine on the lowest hardware layer. The best
    experts on this are probably system administrators
    in schools and colleges around the world - because
    they have to (had to) provide personal computers
    to their students in a public place. At least that
    is where I gained this expertise.

    Regards
    Thomas M. Stricker

  39. #39 Paxton says:

    Worked for me on the 2001 iMac and it came up as OS X 10.1 after I was able to get in

    Localhost recommended I run these two lines first
    /sbin/fsck -y
    and
    /sbin/mount -uw /
    (root was read only) so I did that before doing the remove.

    It left everything on the hard drive, not that I want it.

  40. #40 lucy says:

    when i turn on my macbook i press apple+s but nothing happens and i have forgotten my password completely and i have no discs to re-install it..
    please help me i dont know what to do…i could take it into someone but i never have any time..if you know how to help me that would be great..also i’m not the best with computers so would be great if it was in a simple way.. thanks a bunch!!!

  41. #41 danish says:

    can any1 tell me wat is apple +s where is tht apple key.plz shw me the procedure to strt cmmond prompt where we can write tht cmmand

  42. #42 danish says:

    hey can any1 help me.i gt 1 second hand laptop and itz locked.it shows hfa power house and below tht it ask for username and password which i dnt know.so can tht problem be solved by formatting if yes thn how can i format and if no thn wat is d procedure to unlock my macbook

Leave a reply

Avatars
If you'd like an avatar to appear next to your comment, simply signup for a Gravatar. It's free and takes all of about 2 minutes to setup.

Subscribe without commenting

Close
E-mail It