Subscribe to MacYourself via RSSSubscribe to MacYourself via EmailFollow MacYourself on Twitter
Mini DisplayPort to HDMI adapter
Kanex HDMI Products for Mac

How to reset your Mac OS X password without an installer disc

How to reset your Mac OS X password without an installer disc

Let’s say you totally forgot the password to log on to your Mac. Or maybe you purchased a used Mac from someone else and they’ve got it locked down. There are numerous ways to reset a password with no OS X discs.

This tutorial may ruffle some feathers, but it addresses a topic that a ton of people ask about all the time. Yes, it’s startling to think that anyone could theoretically walk up to your computer and gain access within minutes. Before you go thinking that Mac OS X has a severe vulnerability that makes it less secure than other operating systems, think again. Anyone with physical access to your machine (whether it is Windows, Linux, or Mac) can eventually find a way in if they know what they’re doing. There are ways of bypassing nearly any security measure when a hacker is literally sitting right in front of your system.

The information here has previously been made available from many different sources online and is presented with the intention of helping people with legitimate reasons for resetting their Mac OS X password. A few of the methods floating around the Mac community have been compiled here in one easy-to-reference place. System admins responsible for supporting entire organizations and users who bought used Macs are the folks most likely to benefit from this.

Reset 10.5 Leopard password

  1. Power on or restart your Mac.
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. This step is optional, but it’s a good idea because it checks the consistency of the hard disk before moving on. At the prompt, type fsck -fy and press Enter/Return. Wait for the checks to complete before going to the next step.
  4. Type mount -uw / and press Enter.
  5. Type launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist and press Enter.
  6. Type ls /Users and press Enter. This lists all of the usernames on the computer – helpful if you don’t know or remember what these are.
  7. Type dscl . -passwd /Users/username password and replace “username” with one of the users displayed in the previous step. Replace “password” with a new password of your choice. Press Enter.
  8. Type reboot and press Enter.

Reset 10.4 Tiger password

  1. Power on or restart your Mac.
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. Type sh /etc/rc and press Enter/Return.
  4. Type passwd username and replace “username” with the short name of the user account for which you’d like to reset the password.
  5. Type your desired password and press Enter. It won’t show itself on the screen, so be careful what you type. You will most likely have to enter it again to confirm.
  6. Type reboot and press Enter.

Tricking your Mac into creating a new user account

  1. Power on or restart your Mac (should work for any Mac OS X system).
  2. At the chime (or grey screen if your chime is turned off), hold down Command+S on your keyboard to enter single-user mode.
  3. This step is optional, but it’s a good idea because it checks the consistency of the hard disk before moving on. At the prompt, type fsck -fy and press Enter/Return. Wait for the checks to complete before going to the next step.
  4. Type mount -uw / and press Enter.
  5. Type rm /var/db/.AppleSetupDone and press Enter.
  6. Type shutdown -h now and press Enter.

The third method of resetting your Mac’s password requires some additional explanation. Rather than simply changing the password like the previous two methods do, this one fools the operating system into believing it has never been started before. This means when you restart the machine, it will take you through the entire setup & registration process all over again. Do not worry, all of your pre-existing data is still available. Just continue with this process and do not choose the option to transfer or migrate information to the Mac.

Once you’re done, log in with your new admin account and go to System Preferences > Accounts. You may have to click on the lock icon in the lower-left corner before making changes here. You should see your original user account(s) in the left column. Try clicking on one of them to convert it to a standard user account (uncheck “Allow user to administer this computer”) and change the password. You should be able to successfully log in to that account now and access all of your files and programs. If you want, you can log back in with your new admin account and re-check the “Allow user to administer this computer” option in System Preferences to grant admin privileges to the original user again.

That should cover it! As always, remember messing with single-user mode and Terminal is risky and may lead to trouble if you make mistakes. Considering you’re already locked out of the computer, though, you’ll probably be willing to take your chances at this point.

One last thing… if you have a Keychain Access password, you will probably need to reset that as well. You can do this by selecting “login” under Keychains on the left and choosing Delete from the Edit menu. You’ll lose everything in the Keychain, but you’ll now be able to start fresh and add new ones.

Share/Save/Bookmark
Share/Save It
Digg ThisStumbleUponDel.icio.usTwitterFacebook

53 Comments Have Been Posted (Leave Your Response)

I have a 12″ MacBook pro. It wont reboot. It just stays on the grey screen with the apple logo. I tried the command c,fsck -fy, reboot routine but it just wont start.
I need help. Its my only computer and Im in the f***ing Artic. No reboot cds, tech support here.

Thanx a lot!

hi..i reset my computer using the third method stated above..i did this with three other macs and it worked awesome however, with my imac, when i got to the registration page i could not type in anything..why can i not type anything and how can i fix this? (i repeated the reset process and it did the same thing)

I used method 3 with success! Thanks for the info. Now I know what OS I have, also.

I tried method 1 and 3 without success did everything key for key twice and did nothing. Does this work

Thank You…Thank YOU…THANK YOU!!!
Your instructions SAVED THE DAY!!!

I did, however, have to try it a few times as I didn’t know if there was a space or not.

THANKS AGAIN!!!!!!!!!!!!!!!!!!!!!!

Thanks 10000x you saved my day!!!

Any suggestions on how to prevent this? (Besides avoiding physical access to the Laptop)

This surely works. I used method 1 reset your 10.5 Leopard password and it was a breeze. I actually used it on snow leopard and it worked just fine. Thanks for the help!!!!!!!!!!!

@FrozenBook – Setting up an Open Firmware or EFI password should prevent this, but there are ways around that too. It at least makes it more difficult.
See apple link about Open Firmware and EFI:
http://support.apple.com/kb/HT1352

Thank’s a lot Doug!
Whether or not an attacker can bypass / reset this password, an additional level of difficulty is always the way to go.

Thank you so much! Saved my day! :D

Thanks so much! This worked perfectly on a 17″ Macbook Pro running 10.5

I also have lost login password my used computer. I try above first method when I type 5 line it says shocket not connected and no file or directory message. how can resolve it. when type reboot it reboot and reboot only never work.

This process really worked for me, I was able to reset my powerbook g4 system with this method.
Thanks!

when i put sh /etc/rc a lot of things come out them it turn on like normal but the password is still there

I did above method (for 10.5) when I reach line 5 and enter but it says, Socket not connected

Got through the first 3 steps and now it is saying no root file when I type in the rm/var/db/.AppleSetupDone. Any help? I am doing this on an old Imac that my daughter forgot her password on. Tahnks!

I can’t reboot it, Liked when i try to command+S than it wont work. It went to the Login Pagged. So I’m So confused what should i do?

will it work on a macbook pro 13,3″ with snow leopard 10.6.2?
wich one of the three options should i take?

So I got pretty far… when I typed rm var/db/.AppleSetupDone all that happened was that it made a bunch of commands and then was like AppleSetupDone? and I didnt know if I say yes or not… so i just put in the shutdown part and the computer turned off…
Would anyone be willing to talk to me on the phone and help me throught this?

Ok This is exactly what happens: I type in rm /var/db/.AppleSetupDone and then I get this back : override rw- – - – - – root/wheel for /var/db/.AppleSetupDone?

What do I say to that??

1. Start up in single-user mode.


2. Type: mount -uw /


3. Press Return.

4. Type this, then press Return:
passwd (user’s short name)

Replace “(user’s short name)” with the short name of the user account whose password you wish to reset. If you are not sure what the account name is, you can get a list of user names by typing: ls /Users

6. Enter a new user password (and press Return).


7. Type: reboot


8. Press Return.

9. Done

For systems with Mac OS X v10.4 to v10.4.11

1. Start up in single-user mode.


2. Type: mount -uw /



3. Press Return.

4. Type this, then Press Return: sh /etc/rc

Note: There is no onscreen indication when the “rc” script is finished. When nothing happens for a while, it’s probably done. Press Return to produce a prompt.

5. Type this, then Press Return:

passwd (user’s short name)

Replace “(user’s short name)” with the short name of the user account whose password you wish to reset. If you are not sure what the account name is, you can get a list of user names by typing: ls /Users

6. Enter a new user password (and press Return).

7. Type: reboot


8. Press Return.

What keys do you use what you have a PC keyboard ???

once iv reset the password it doesnt work it says sorry everytime

i did the last thing and i typed all the commands in single usr mode, but when I turned it on after doing that, nothing happened! It seems like that had no effect on it because the login screen just popped up as normal and I logged in as myself.

I did

fsck -fy

mount -uw /

than

rm /var/db/AppleSetupDone

it says no such file or directory.

When i use the following command;

fsck -fy
mount -uw /
launchctl load /System/Library/LaunchDaemons…. .plist

It says socket not connected.

When I use

Ls /Users

It says

Admin

now my computer reboot and reboot never start.

I have not installation CD, it is purchased used.

How can I re-use ?

thanks a lot!!!!!!!!!!

Thank you thank you thank you!!!! Step three worked!!!!! You rock!!!!

I did these steps. Now my keyboard does not work at registration…? what do I do?

Hi! please help me!!

i was about to change my password and typed in the old password incorrectly too many times. thus, it changed old password to some keychain password that i have no idea of. By doing this method above, where you type in:
* mount -uw /
* rm /var/db/.AppleSetupDone
* shutdown -h now

will that delete all of my info on the hard drive and totally start everything from scratch with a new admin?

thanks!!

Ben,
You will not lose any of the information on your Mac by using that method. The 2 paragraphs following those steps explain what will happen and how you can recover your old account.

Hi, I got my macbook fixed and the people set a password – that they don’t even know! Will using these methods restart my whole computer and delete everything? :/ Im scared in case it will! ):

Hi there, I have this same problem-

“Ok This is exactly what happens: I type in rm /var/db/.AppleSetupDone and then I get this back : override rw- – – – – – root/wheel for /var/db/.AppleSetupDone?
What do I say to that??”

However i’ve typed yes then he shutdown command following, when I startup again no new admin presents itself

same goes for when I type no

Thoughts? (AND THANKS! for the help)

i tried a thousand other ways and sites in s mode and this was the only one that worked!!

-Jc

xpcman – Oct 10, 2009 8:27pm BST
corrected text

1.REBOOT
2. COMMAND & S (AFTER YOU HERE THE CHIME)
3.AFTER TEXT PROMPT ENTER IN THESE TERMINAL COMMANDS (PRESS ENTER AFTER EACH LINE)

mount -w /
rm /var/db/.AppleSetupDone
shutdown -h now

****make sure to use spaces and capital letters EXACTLY as shown in the terminal commands above****

IT will not WORK if you don’t type it EXACTLY like this

Hunter Pendleton
June 13th, 2010, 1:05 PM

I enter single user mode by doing command+S at start up and the prompt is a root prompt (root#).

The fsck -fy returns an OK after checking, but the mount -uw return a message the the socket is not connected.

What to do?

What do you do when it says “socket not connected” after typing the launchctl thing

Awesome Information, Just used it to reset the admin password on my 10.4 macbook, no problems using the second technique…Thank You for posting this

Jim, i’m running 10.4.11… Went through each step to the letter. I’ve tried rm /var/db/.AppleSetupDone but nothing happens for that line. Any ideas? Thanks for the help :)

What do you do when it says “socket not connected” after typing the launchctl thing

people tryin the steps be sure to put a space in for certain portions of the entries like fsckspacebar-fy other then that did it yesterday 10mins it was done

will this work for a 10.6.3 ?

I tried method 3 to reset a macbook loaded up to welcome video and registartion i type in new user name and password then click continue
the spinning gear pops up for a second freezes then it goes directly back to the welcome video and suggestions

cant get mac in single user mode…. using pc key board

Hi does anyone have a similar solution for OS9 imac ? I gave my old machine to the kids but they’ve put a password in and now can’t remember it ! Thanks.

great! worked fine for me !

No one answered the issue from “BJ” after he did the procedure.

I’m also having the same issue.

After doing the process, my keyboard is now blocked. Not able to get passed the Registration screen because the keyboard make the sound like its blocked.

Keyboard does work, because I tried the procedure again, and works in terminal.

Please Help!!

This is a masterpiece of computer hacking men, who are you men. This is pretty impressive, anywy thnkZ dude.

What do u do if the command s doesn’t work? I dont have any software to go with it.

Does anybody know how to do this for OS X 10.6.3 ??

the instructions above in the initial post for 10.5 didn’t work (Socket Not Connected error message).

Any help/suggestions would be greatly appreciated!

(except not the

mount -w /
rm /var/db/.AppleSetupDone
shutdown -h now

command, as that is not the kind of restart i need. i even tried it and it didn’t do anything, much less what i need)

the problem is that the computer was bought at a pawn shop and came with no discs. the old users password is keeping me from deleting applications/manually cleaning out the computer.

thanks again-

i have the same question please help…..

I tried option 3 and it worked successfully. Thank you!

I tried option 3… I got stuck at the new registration step as I put in the all the reg info and after I click to complete the reg process the system auto reboots taking me back to the same reg process… over and over again.. without doing anything else. How do I undo this process to restore the computer back how it was before I tried the third option info???

Have Something To Say? Join The Discussion!

  (required)
  (required; will be kept private)
  (optional)