Skip navigation

How to reset admin password iMac

115947 Views 9 Replies Latest reply: Apr 13, 2014 12:42 AM by jasonsteven1212 RSS
Butterflyblue70 Level 1 Level 1 (0 points)
Currently Being Moderated
May 10, 2013 3:46 PM

I changed my IMac admin password and have now forgotten in and can't find my originàl discs to reset it. I understand you can reset it using apple ID but I can't work it out.  Can someone help me

  • Kappy Level 10 Level 10 (221,010 points)
    Currently Being Moderated
    May 10, 2013 3:48 PM (in response to Butterflyblue70)

    Forgot Your Account Password

     

    For Snow Leopard and earlier

     

         Mac OS X 10.6- If you forget your administrator password

     

    For Lion/Mountain Lion

     

        Boot to the Recovery HD:

     

    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.

     

         When the menubar appears select Terminal from the Utilities menu.

         Enter resetpassword at the prompt and press RETURN. Follow

         instructions in the dialog window that will appear.

     

         Or see Reset a Mac OS X 10.7 Lion Password and

         OS X Lion- Apple ID can be used to reset your user account password.

     

    If you are unable to boot from an installer DVD:

     

    (these will only work on Leopard or earlier)

     

      1. Boot to Safe Mode by restarting and after the chime press and hold down

          the COMMAND-S keys until a black screen with white type appears.

     

      2. At the prompt, type the following commands pressing return after each

          command line:

     

         /sbin/fsck -yf

     

         If you do not receive a "Filesystem OK" message then repeat this command

         until you do.  If after seven tries you still do not receive a "Filesystem OK"

         message, then the system is corrupted and needs to be reinstalled.

     

         mount -uw /

         cd /private/var/db/netinfo

         mv local.nidb local.old

         rm ../.AppleSetupDone

         shutdown -r now

     

    The second-to-last command above will cause OS X to think that the operating system is newly installed, and when the new owner starts up the computer it will send him/her to the startup wizard where he/she can start a new user without reinstalling.

     

    This last method does not actually change a password. It simply removes the user accounts and lets you create an initial admin account as if the computer were new out of the box.

     

    Reset Admin Password Using The Terminal

     

    You can reset the password by printing out (or writing down) and carefully following these steps.

     

    First, find the short name of the admin user on the machine. The easiest way of doing this is by looking at what the directory is called in the Users folder.

     

    Now, start in Single-user Mode. It should boot into a command line.

     

    Enter these exact lines. Press RETURN after each.

     

    mount -uw /

    ifconfig lo0 up

    cd /var/db/netinfo

    netinfod -s local

     

    Now you'll need that short name. Enter "passwd", a space, and the short name of the admin. For example, if the admin was rather prosaically called "imadmin", you would enter "passwd imadmin".

     

    The computer will now prompt you to change the password for "lmadmin" (or whatever the short name was). Go ahead and enter a new password.

     

    Now, enter:

     

    sync

    reboot

     

    and the machine will reboot. The admin password should now be changed.

  • Sam Hayder Level 1 Level 1 (25 points)
    Currently Being Moderated
    Jun 13, 2013 3:40 PM (in response to Kappy)

    Hello,

     

    I just tried to do the

    Reset Admin Password Using The Terminal


    However when I get to

    cd /var/db/netinfo

     

     

    I get: No Such file or directory.

     

     

    Any ideas?

     

    Cheers,

  • Kappy Level 10 Level 10 (221,010 points)
    Currently Being Moderated
    Jun 13, 2013 3:44 PM (in response to Sam Hayder)

    Version of OS X, please? Also, see:

     

    For Snow Leopard and earlier without installer DVD

     

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

  • Sam Hayder Level 1 Level 1 (25 points)
    Currently Being Moderated
    Jun 13, 2013 4:19 PM (in response to Kappy)

    It was a 10.5.7 Machine. I've managed to sort it now, found an external dvd drive to use as the internal one is dead.

  • rainer217 Level 1 Level 1 (0 points)
    Currently Being Moderated
    Aug 11, 2013 2:26 AM (in response to Kappy)

    I have a 10.8.2 software and i hold OPTION (alt) key and went to a recovery page and i clicked on my hard drive that i used, but i immediately shut down my laptop because i wasent sure if if will deletes all my files, if i doesent the pls reply cause i also lost my admin password thanks.

  • amirrahim Level 1 Level 1 (0 points)
    Currently Being Moderated
    Oct 29, 2013 4:07 AM (in response to Kappy)

    Yes, thanks, Kappy!

     

    The MacYourself link gave me great advice to reset the password from Terminal. Worked great!

     

    http://www.macyourself.com/2009/08/03/how-to-reset-your-mac-os-x-password-withou t-an-installer-disc/

    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.

     

    Message was edited by: amirrahim

  • edmineck Level 1 Level 1 (0 points)
    Currently Being Moderated
    Jan 19, 2014 10:46 AM (in response to amirrahim)

    Thank you !! perfect

  • jacqdunn Level 1 Level 1 (0 points)
    Currently Being Moderated
    Feb 23, 2014 2:06 PM (in response to Kappy)

    Thanks Kappy.  I now have access to my computer, but had to start new keychain.  Any way to retrieve the old one ?

  • jasonsteven1212 Level 1 Level 1 (0 points)
    Currently Being Moderated
    Apr 13, 2014 12:42 AM (in response to Butterflyblue70)

    This got my hopes up when I discovered my problem this morning. My 'e' key, 'd' and 3 key dont work. I cannot use tge root commands and bypass the loggin password which contains both 3 and e.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (2)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.