Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I lost the superuser password for my iMac and I don't have the boot disk. I already tried the second answer on this page, but every time I type su from the command prompt, it still asks for a password that I don't have anymore. Is there another way to reset the superuser password?

share|improve this question
2  
Did you enable the root user and are referring to that "superuser" password, or did you lose the last (or all) admin user's passwords? As long as you have an admin user, sudo and this article will let you reset (but not recover) the old root password. support.apple.com/kb/HT1528 –  bmike Mar 5 '12 at 17:54
add comment

5 Answers

up vote 8 down vote accepted
sudo passwd root

Enter YOUR password and you're in.

share|improve this answer
    
You can also disable / re-enable the root user and pick a new password following this article. support.apple.com/kb/HT1528 –  bmike Mar 5 '12 at 17:54
    
You can also use sudo su if you really need su. –  CajunLuke Aug 30 '12 at 19:04
    
You might also want to have a look at sudo -i and sudo -s –  Max Ried Aug 30 '12 at 19:06
add comment

If you have an administrator user account set up on your Mac in addition to the root account, you can use the Directory Utility to do the following:

  1. Open the Directory Utility from /System/Library/CoreServices.

  2. Click the lock button and authenticate as an administrator: enter image description here

  3. Go to the menu Edit → Change root password...: enter image description here

  4. It should prompt you to enter a new root password: enter image description here

Again, you have to have access to an administrator account to do this (so you can authenticate).

Good luck.

share|improve this answer
add comment

I found this on the web.

http://en.kioskea.net/forum/affich-73393-change-mac-admin-password-without-the-disk

The obvious downside is the fact you can't actually recover your password: you'd have to delete the account, and use the new administrator. Nonetheless, you could get hold of the files in the Home Folder before the account is deleted, or even after, as OSX allows you to delete an account but keep the files in it.

The files will be protected, though there are some ways in which you should be able to remove the restrictions on them. You could simply use Terminal to chown the directory and all it's contents, and once you remove the permissions all the files in your previous account should be accessible to your new account.

If you decide to follow this method I could provide more information on how to chown the directory, though a web search should do.

Hope it helps!

share|improve this answer
add comment

Open Terminal.app and run:

sudo passwd root

Type the current admin password
Type the new password to root
Re-type new password to root

Done!

share|improve this answer
add comment

The best solution for 10.7 and 10.8 is to boot in recovery mode (CMD+R). Then, open a terminal window and type the command "resetpassword". This will open a window which will allow you to reset any user's password.

http://osxdaily.com/2011/08/24/reset-mac-os-x-10-7-lion-password/

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.