How to reset admin password iMac

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

Posted on May 10, 2013 3:46 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 29, 2013 4:07 AM

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

28 replies
Question marked as Top-ranking reply

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

May 13, 2016 8:25 AM in response to Butterflyblue70

Hey, you might try this if you forgot your administrator password. 1. turn off your computer. 2. On your computer's keyboard, press and hold the command, and r keys, turn your computer back on, but continue to hold the command, and r keys. When you see the os ten utilities screen, you can release the keys. Now go to the utilities menu in the menu bar, and select terminal. Now type in, resetpassword, exactly as listed here, then press the enter key. then exit turminal. In the resetpassword utility, select the name of your hard drive, by default, it's named, macintosh hd. Then, choose the administrator account from the popup menu that's the one you forgot the password for. Now enter a new password, and confirm it, and then click save. now you should be good to go. Restart your computer as you normally would, and you should now be able to login with your new password. You might have to reset the keychane password, but after that, you should be good to go. Hope this helps you.

Jul 19, 2016 10:11 PM in response to Butterflyblue70

Try this. 1. Turn off your iMac. 2. press and hold the command and r keys, and then turn your iMac back on, but continue to hold down command and r. This should take you into os ten recovery. Don't worry, You aren't going to have to format your harddrive and reinstall os ten from skratch. If asked for a firmware password, enter it and press the enter key. If you don't have a firmware password set, then you can skip this step. At the os ten utilities screen, go to the utilities menu in the menu bar, and click terminal. At the terminal prompt, enter "resetpassword" and press enter. The reset password utility should open in the background. You may have to switch to that window. If you want, you can close the terminal application. You won't need to type anything else. In the reset password window, select the drive or partition os ten is installed on. By default, their should only be 1 listed, called macintosh hd by default. If you have multiple operating systems installed on your iMac, select the disk or partition that contains your forgotten admin password. After that, click on the popup button, and select the name of your admin account in question. If you only have 1 account on your computer, the options will be your own user account and the root account. Do not select root. Select your admin account that you forgot the password for. Now, type in a new password in the password and confirm password fields, and then click save. The utility should Display a dialogue box telling you that the password was reset. Now, you can click the okay button, close the reset password application, and then restart your iMac, and let it boot normally. Note, when you login to your admin account with your new password that you set, you might get a dialogue box about the key chain password. If you remember the old password you used, the one you forgot, click on the update Keychain password button, and type the password you used before you reset it. If you don't remember the old Keychain password, don't worry, just click the create a new key chain password button. Your done, you shouldn't get that dialogue box again. If you don't want to do anything with the Keychain at this time, just click the continue login button. You shouldn't get notified about the Keychain until the next time you login to your admin account. I hope this wasn't too complicated for you to follow, and that your forgotten admin password was successfully reset. I can definitely understand the way you might feel when you try to login to your computer, but you can't because you forgot your admin password. That can be very frustrating and can be a pain too. I hope you have a great night and that this helped you. Please reply too this message if you need any further assistance, or if this tip didn't solve your problem, and I will try to further assist you as best I can. Have a great night.

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.

May 28, 2014 12:53 AM in response to Butterflyblue70

1)shut down the macbook.

2) press power button and within 2 seconds press apple logo (command) button + s together

3)wait for some time 10 seconds until the screen becomes full of numbers and text on black screen.

4)you will get something like root#

5) then type (please note that there is space between some words)

mount -uw /

(press enter)

launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist

(press enter)

ls /Users ( ie first letter is small letter of 'L' )

(press enter)

dscl . -passwd /Users/username password (ie replace username with the username which needs the password to be changed and then space and type the new password)

(press enter)

reboot

macbook will restart, then type the new password and press enter then click set new keychain password, finished you have set the new password. None of your data is affected.

Apr 10, 2015 11:54 AM in response to amirrahim

Hey, I used your advice to reset my admin password, which worked, but when I tried to register my Mac again, the touch pad stopped working. The cursor will highlight apps, but we cannot get into any applications. We have no idea if our information from previous is saved or available. At first I thought it was in voice over mode, but when I turned it off using command-F5, I still could not double click or open anything. Help, please! Did I do something in command prompt to deactivate the touch pad?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to reset admin password iMac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.