Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My friend has a MacBook (13-inch Late 2007) which was setup by someone else.

He can use the computer (he's never turned it off) but has forgotten his password. To make matters worse, home is a long way away and can't get a hold of the original install disks (which would make this a lot more easier).

What options do I have to reset the password for him?

share|improve this question
add comment

3 Answers

up vote 7 down vote accepted

Update April, 2014: On newer versions of OSX, the original advice (below) no longer applies. "Newer versions" here means at least 10.8 and 10.9. It should apply to any version of OSX with a dedicated recovery partition though.

Here's the newer way to do this:

  1. Boot the system into recovery mode. To do this, reboot and hold down Command and the 'r' key at the same time.
  2. Launch a terminal and enter resetpassword.
  3. This will launch a window. From there, you can choose what user you want to reset the password for (including root, if you've enabled root).

Original version: The article that John links to suggests that you use the installer disc to repair a lost admin password, but since you mention that you're far from an installer disc, I will mention that there is an old Unix hack available. (Edit: Just to clarify, once upon a time there was another answer here that linked to this Apple support page. I still think that's a useful page to have linked as part of this discussion, so I'm putting it into this answer. Also, I don't want anyone thinking I imagined another answer.)

  1. Boot the system into single-user mode. To do this, reboot and hold down Command and the 's' key at the same time. You're going to get a black screen and a lot of text. Don't freak out.

  2. Mount the root volume by entering this (this command should be mentioned near the bottom of all the text you see as well):

    /sbin/mount -uw /

  3. (Edit: Read all the way to the end for an alternative approach here.) Change your root user's password by entering passwd (no 'o' and no 'r'). It will prompt you to enter a password twice. Remember this one.

  4. Enter exit to boot the rest of the way into the normal pretty Mac GUI.

  5. Open a terminal, enter su and your new root password.

  6. Enter passwd <name-of-user-here> but, you know, put the name of the user whose password you want to change, instead of <name-of-user-here>.

  7. Change that user's password. Enter exit to drop the superuser status and powers. Enjoy your new password.

Note that many modern Unix-like distros block this "reset the root user password without knowing the old one" hack, but I just did it on the Mac I'm at (a brand new MacBook Pro). So, apparently, Mac hasn't blocked it. That's too bad in general, but perhaps good for you and your friend.

Edit: Some people have mentioned in the comments that you can skip resetting the root password and simply reset the user's password. To do that, at step 3 above enter passwd <name-of-user-here> and then enter a new password for the user. If you do that, you can skip steps 5-7. Just follow step 4 to boot into the GUI and you're done.

This is a good alternative if that user was an administrator for the machine. However, if the user was not an admin for the machine, you should make sure to reset an admin's password as well (or to reset a root password as I did above). You can repeat passwd <name-of-user-here> as many times as you need for various users. Just make sure to reset at least one account that has admin privileges. That way you have not only a user's password, but administrative access to the machine.

share|improve this answer
    
thanks, i'll try this later on today. –  cust0s Aug 27 '09 at 10:46
    
I would recommend against messing with the root password in single user mode, you should also be able to type passwd username where username is the user in question's short name. –  Sidnicious Aug 27 '09 at 13:37
    
Note that changing the password this way will not change the user's keychain password — you'll lose access to any passwords that were saved with the account. –  Sidnicious Aug 27 '09 at 13:38
    
@SidneySM: passwd username won't work if (1) you don't know the user's old password (you need it as a regular user to change to a new one) or (2) you don't have the root password. I don't use the keychain, so you may be absolutely right about that. I tested this method yesterday on my machine before posting the advice, since I had only done it previously on Linux machines. It worked perfectly, but as I say, I don't use Keychain, so I can't speak to that. –  Telemachus Aug 27 '09 at 14:10
1  
@Telemachus: passwd username doesn't require the old password if you run it as root, which is what you're doing in single-user mode. I just tested this to confirm, and it works fine on OS X 10.5. IIRC under 10.4 things were more complicated because you had to manually start netinfo in order to get access to the user database, but this is not necessary under 10.5. –  Gordon Davisson Aug 27 '09 at 15:07
show 4 more comments

Isn't it possible to do with any install disc? Apple says you only need a disc

whose version is closest to the version of Mac OS X installed

Why bother doing things the complicated way when there's got to be someone in town with an install disc?

share|improve this answer
1  
+1 for non-linear thinking ;-) –  Uwe Honekamp Aug 27 '09 at 4:19
add comment

OS X Daily has a great article that describes two approaches in detail (one with an install DVD and one without). It's actually pretty scary how easy this is.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.