You can reset an iMac without the password, but the method depends on whether you set up recovery options beforehand
If you are locked out of your iMac, you have a path forward — but it requires either a recovery key you saved earlier, another admin account on the same machine, or access to the Apple ID associated with the account. The fastest route is usually the one you prepared for before you forgot the password. If you did not prepare anything, the process takes longer and may require proof of ownership to Apple.
The method also depends on which version of macOS your iMac runs. Newer machines (2018 and later) use different recovery tools than older ones. Knowing which macOS version you have before you start saves time, though you can often find this information from the login screen itself.
Key Takeaways
- If you saved a recovery key when you first set up your iMac, you can use it to reset the password without losing any files.
- If another person has an admin account on the same iMac, they can reset your password from System Settings without erasing anything.
- If you remember the Apple ID and password linked to your account, you can reset the password from the login screen by clicking the question mark icon.
- If none of those options work, you will need to contact Apple Support with proof of ownership, as the final step requires erasing the iMac and starting over.
Using a recovery key to reset your password
A recovery key is a 28-character code that Apple generates when you turn on two-factor authentication for your Apple ID. If you wrote this down or saved it somewhere safe when you set up your iMac, you can use it now.
Go to the login screen and click the question mark icon in the password field. A window will open asking whether you want to reset your password using your Apple ID or a recovery key. Select "Use a recovery key." Enter the 28-character code exactly as you saved it — spaces and hyphens matter. After you enter it, you will be prompted to create a new password. Your files and settings stay on the iMac; only the password changes.
If you cannot find your recovery key, check your email for a message from Apple ID Support sent around the time you set up two-factor authentication. Some people save it in a password manager, a notes app, or a physical notebook. If it is truly gone, move to the next method.
Asking another admin account holder to reset it
If someone else uses the same iMac and has an admin account, they can reset your password without needing any codes or Apple ID information. This is the simplest path if it is available to you.
Have the other person log in to their account. Open System Settings (or System Preferences on older macOS versions). Go to General > Users & Groups (or just Users & Groups). Click the lock icon at the bottom left and enter their password to unlock the settings. Find your account in the list on the left, select it, and click "Reset Password." They can set a temporary password for you, which you can change to something new the next time you log in.
This method works on any macOS version and does not erase anything on the iMac. It is also the fastest option if the other person is physically present or can do it remotely while you watch.
Resetting the password using your Apple ID from the login screen
If you remember the Apple ID and password associated with your account, you can reset the password directly from the login screen. This works on macOS Big Sur (version 11) and newer.
At the login screen, click the question mark icon next to the password field. A dialog will appear asking how you want to reset your password. Select "Use your Apple ID." Enter your Apple ID email address and password when prompted. You will then be asked to enter a new password for your iMac account. After you do, you can log in with the new password.
This method does not erase your files or settings. However, it only works if you still have access to the Apple ID email address and can receive verification codes if Apple sends them. If your Apple ID email is no longer active or you cannot access it, this route is closed.
Starting over with a full erase (when nothing else works)
If you have no recovery key, no other admin account, and no access to the Apple ID, your only option is to erase the iMac and set it up as new. This deletes everything on the machine, so only do this if you have backed up your files elsewhere or if the iMac is empty.
Restart the iMac and hold Command + R as it boots up. This opens Recovery Mode. Wait for the macOS Utilities window to appear. Click "Erase Mac" (or "Disk Utility" on older versions, then select your drive and click "Erase"). Choose a format — APFS for newer iMacs, Mac OS Extended for older ones — and confirm. After the erase completes, the iMac will restart and show the setup screen, where you can create a new account and password from scratch.
This process takes 20 to 60 minutes depending on the iMac's age and storage size. Before you start, make sure you have the iMac's serial number available. If Apple's servers cannot verify that you own the machine, you may be asked to prove ownership before the setup completes.
What to do if Recovery Mode will not open
Sometimes Command + R does not work, usually because the iMac is too old or the recovery partition is damaged. Try Command + Option + R instead, which downloads recovery tools from Apple's servers. This takes longer but often works when the local recovery partition does not.
If neither key combination works, restart the iMac and hold the power button for 10 seconds to force it off. Wait 30 seconds, then turn it back on and try Command + R again. If it still does not work, the iMac may need service. Contact Apple Support with your serial number and describe what happens when you try to enter Recovery Mode.
Preventing this from happening again
Once you have reset your password and regained access, take 10 minutes to prepare for the next time you might forget it. Turn on two-factor authentication for your Apple ID if you have not already. When you do, Apple will generate a recovery key — write it down or save it in a password manager you trust, not in a note on the iMac itself.
If you live with someone else who uses the iMac, make sure they have an admin account. If you are the only user, consider creating a second admin account for yourself and storing its password somewhere separate from your main account password. This gives you a backup way in if you forget the primary password.
Frequently Asked Questions
Will resetting my password delete my files?
No, not if you use a recovery key, another admin account, or your Apple ID to reset it. Only a full erase deletes files. If you must erase the iMac, back up to an external drive or cloud storage first if you can still access the machine at all.
What if I do not remember my Apple ID password either?
Go to iforgot.apple.com and enter your Apple ID email address. Apple will send a reset link to that email or ask you to answer security questions you set up when you created the ID. Once you reset the Apple ID password, you can use it to reset your iMac password from the login screen.
Can I reset the password if the iMac is encrypted with FileVault?
Yes. FileVault encryption does not block password resets — it only encrypts the files on disk. Use any of the methods above. If you erase the iMac, you will not be asked for a FileVault password during the erase process.
How long does it take to erase and set up an iMac from scratch?
The erase itself takes 20 to 60 minutes depending on storage size. The initial setup after that takes another 15 to 30 minutes. If Apple asks for proof of ownership, add time for that verification step, which can take a few hours to a day.
What if I get stuck in Recovery Mode and cannot get out?
Restart the iMac normally by clicking the Apple menu and selecting Restart. If that does not work, hold the power button for 10 seconds to force a shutdown, then turn it back on. You should return to the normal login screen. If you are still in Recovery Mode, the iMac may need service.