Reset OS X Password Without an OS X CD
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:
- Reboot
- Hold apple + s down after you hear the chime.
- 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
- 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!
Related research and analysis from GigaOM Pro:
Subscriber content. Sign up for a free trial.
So – it’s just that simple to hack a Mac OS machine if you have physical access? Are passwords basically useless then?
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.
Yeah, now I’m f-ed thanks to this post.
Thanks for making the comment-You saved me a lot of hassle.
It would have helped if it was in the post!
no it dosent since you make a new admin you have acsess to change any other admins password the you go into the other account and delete your temporary one you made
Blabla is right. EW, Tex, and Steve don’t know how to go to accounts page in system preferences to recover the old account.
I did what this post suggested, and ended up with a machine that wanted to go through the original setup process, as it had ‘lost’ all my accounts.
But this *seems to have* fixed it:
mount -uw /
touch /var/db/.AppleSetupDone
shutdown -h now
The file .AppleSetupDone should have stuff in it (name, city, eye colour, registration info, etc), but it *seems* to work just as an empty file.
Does that really work?
did you find anything else that could possibly fix this problem?!
I followed this & I still can’t Log into my Mac with my own Name & Password which is really weird!
I don’t have my Mac original CD so I guess I’m kinda stuck, huh!
I have a MacBook & I went inside my settings & changed all users back to admin name & password & shut off my Labtop; after I powered it up again, after I typed in the admin name(my name & last name), I punch in my password & than enter; it doesn’t work & wont let me pass that window!!!; I tried ■mount -uw /
■rm /var/db/.AppleSetupDone
■shutdown -h now
than powered it up again & now all I get is Black & Grey window!; So I tried your instructions(Above)(mount -uw /
touch /var/db/.AppleSetupDone
shutdown -h now); Now I’m back where I started as I can’t pass my password window again!!!
Anyone know what to do as I would hate to take it into an actual Apple Store as I would hate to pay $$$ for something I can fix myself.
HELP PLEASE!!!
YUH TIGHT
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.
its not working
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…
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.
>rm -R /Users/Username
That removes the users home directory. It doesn’t actually remove the account from the user list.
If you’re already going into single user mode, do it the right way
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
:)
You saved my life!
brilliant, following the much treasured KISS principle.
Thanks alot !!!!!!!!!!
@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 ;-)
Awesome!
I had no idea. I recently just reformatted a Mac. Had I known this I could have saved valuable time and effort.
Thanks!