The fastest way back into your iMac
If you have forgotten your iMac password, you can recover access through your Apple ID, a recovery key, or a trusted device — whichever you set up when you created your account. The method that works depends on what you have available right now. If you have your Apple ID password and access to the email address tied to it, that is usually the quickest path. If not, a recovery key (a 28-character code Apple gave you when you turned on two-factor authentication) will get you in without needing to remember anything else.
The process takes place on the login screen itself — you do not need to be inside your Mac to start. You will see a question mark button or a "Reset Password" option depending on your macOS version. Clicking it begins a series of prompts that walk you through proving your identity to Apple's servers, then lets you set a new password when ready.
Key Takeaways
- Your Apple ID and its associated email address are the most common way to reset a forgotten iMac password from the login screen.
- A recovery key — a 28-character code from two-factor authentication setup — can reset your password without needing your Apple ID password.
- If you have a second Apple device (iPhone, iPad, or another Mac) signed into the same Apple ID, you can use it to reset your password remotely.
- Without any of these options, you will need to use Recovery Mode and erase your Mac, which deletes all local files unless you have a Time Machine backup.
Resetting your password from the login screen using your Apple ID
Start at the iMac login screen. Look for a question mark icon or a "Reset Password" button below the password field — the exact label depends on whether your Mac is running Big Sur, Monterey, Ventura, or a newer version. Click it.
A dialog box will appear asking for your Apple ID email address. Type the email address you use to sign into your iMac. The Mac will then ask you to verify your identity. If your iMac is connected to the internet, it will send a verification code to that email address. Check your email inbox (and spam folder) for a message from Apple. The code is usually six digits. Type it into the dialog on your Mac.
Once Apple confirms your identity, you will be prompted to create a new password. Make it at least eight characters long and include uppercase letters, lowercase letters, numbers, and symbols if possible — this makes it harder for someone else to guess. Type the new password twice to confirm it matches. Click the reset button, and your Mac will accept the new password when ready. You can then log in normally.
Using a recovery key if you have one
A recovery key is a 28-character code that Apple generated when you first turned on two-factor authentication for your Apple ID. It looks like this: XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX. If you saved this code in a safe place (a password manager, a printed document, or a find note), you can use it to reset your password without needing your Apple ID password.
From the login screen, click the question mark or "Reset Password" button. When the dialog asks for your Apple ID email, type it in. Instead of waiting for a verification code to arrive by email, look for a link or button that says "Don't have access to your email?" or "Use a recovery key." Click it. Paste or type your recovery key into the field that appears. Apple will verify it when ready — no email needed — and let you set a new password right away.
If you cannot find your recovery key, check any password managers you use, look through printed documents or notebooks, and search your email for messages from Apple that might contain it. Recovery keys are often saved in the same place as other important account information.
Resetting your password from another Apple device
If you own an iPhone, iPad, or another Mac that is signed into the same Apple ID as your iMac, you can use that device to reset your iMac password without being at the iMac itself. This works because Apple can verify your identity through the device you already have access to.
On your iPhone or iPad, open Settings and tap your name at the top. Tap "Password & Security," then "Change Password." You will see an option to reset the password for a different device. Select your iMac from the list of devices. Apple will send a verification code to your iPhone or iPad. Enter it, then create a new password. Your iMac will accept this new password at its login screen within a few minutes.
On another Mac, open System Settings (or System Preferences on older versions), click your Apple ID in the sidebar, then click "Password & Security." Look for an option to reset the password for another device, select your iMac, and follow the same verification process.
What to do if you have no recovery options available
If you do not have your Apple ID password, a recovery key, or access to a second Apple device, you will need to use Recovery Mode to erase your Mac and set it up again. This erases all files stored locally on your iMac — documents, photos, applications, everything — unless you have a Time Machine backup.
Shut down your iMac completely. Turn it back on and when ready hold down Command + R (or Command + Option + R for older Macs) until you see the Apple logo or a spinning globe. This boots your Mac into Recovery Mode. Once you see the Recovery utilities window, click "Erase Mac" or "Reinstall macOS" depending on your version. Follow the prompts to erase the drive and reinstall the operating system. When setup completes, you will create a new local account and password from scratch.
If you have a Time Machine backup from before you forgot your password, you can restore your files after the erase is complete. Connect the Time Machine drive, go to System Settings, click "General," then "Transfer or Reset," and choose "Restore from Time Machine Backup." This brings back your files and settings without restoring the old password.
Preventing this from happening again
Once you are back into your iMac, take a few minutes to set up recovery options so you never get locked out this way again. Open System Settings, click your Apple ID, then "Password & Security." Make sure two-factor authentication is turned on — this is what generates a recovery key. Write down or save your recovery key in a password manager like iCloud Keychain, 1Password, or Bitwarden. Do not store it in a plain text file on your Mac; store it somewhere separate.
You can also add a trusted phone number to your Apple ID account. This gives you another way to receive verification codes if you forget your password. And if you use a password manager, store your Apple ID password there too — but keep your recovery key separate from your password, in case someone gains access to your password manager.
Frequently Asked Questions
Can I reset my iMac password without an Apple ID?
No. Modern iMacs require an Apple ID to reset a forgotten password from the login screen. If you do not have access to your Apple ID, you will need to use Recovery Mode to erase your Mac and set it up again with a new account.
How long does it take to reset my password?
If you use your Apple ID or recovery key from the login screen, the reset happens when ready — usually under a minute. If you use a second device, the change takes a few minutes to sync to your iMac. If you use Recovery Mode, the erase and reinstall can take 30 minutes to an hour depending on your internet speed.
Will resetting my password delete my files?
No. Resetting your password from the login screen, using a recovery key, or using another device only changes your password — your files stay intact. Only erasing your Mac in Recovery Mode deletes files, and that only happens if you have no other recovery options.
What if I forgot my Apple ID password too?
Go to iforgot.apple.com on any device with internet access. Enter your Apple ID email address and follow the prompts to reset it. Once you have your Apple ID password back, you can use it to reset your iMac password from the login screen.
Can someone else reset my iMac password?
Only if they have your Apple ID password, your recovery key, or physical access to a trusted device signed into your account. This is why keeping your recovery key in a separate, find location is important — it prevents someone who finds your password from also resetting your Mac.