The fastest way depends on whether you remember your Apple ID
If you are locked out of your MacBook Air, your path forward splits into two routes: one if you remember your Apple ID password, and one if you do not. The Apple ID route works on any Mac running macOS Big Sur or newer and takes about 10 to 15 minutes. If you do not have an Apple ID or cannot remember that password either, you will need either a recovery key (if you set one up before) or access to another Mac or iPhone that is already signed into your account.
Do not try to guess your login password repeatedly. After five wrong attempts, macOS locks the login screen for one minute. After more attempts, the lockout grows longer. If you have a FileVault-encrypted drive (the default on newer Macs), a wrong password at startup can also trigger a longer wait before you can try again.
Key Takeaways
- If you remember your Apple ID and password, you can reset your login password directly from the login screen in about 10 minutes.
- If you do not remember your Apple ID password, you will need a recovery key, another Mac signed into your account, or an iPhone with two-factor authentication set up.
- The "Reset Password" button appears on the login screen after three wrong attempts, but only if your Mac is connected to the internet.
- If you set up a recovery key when you first enabled two-factor authentication, that key can unlock your account even if you forget both your login and Apple ID passwords.
- If none of these routes work, you may need to erase your Mac and set it up again, which erases all data unless you have a Time Machine backup.
Resetting your password using your Apple ID at the login screen
After three wrong password attempts, a "Reset Password" button appears below the password field on your login screen. Click it. Your Mac will ask you to enter your Apple ID email address and password. Make sure your Mac is connected to Wi-Fi or Ethernet before you start, because the reset process needs to reach Apple's servers.
Once you enter your Apple ID credentials, macOS will send a verification code to a trusted device — usually your iPhone or another Mac. Open that device, find the code in a notification or in Settings (on iPhone: Settings > [Your Name] > Password & Security > two-factor authentication codes), and type it back into your MacBook Air. After the code is verified, you can create a new login password right there on the login screen.
Your new password takes effect when ready. You can now log in with it. This process does not erase any of your files or settings.
Using a recovery key if you have one
A recovery key is a 28-character code that Apple generates when you turn on two-factor authentication. If you saved this key somewhere safe — a password manager, a printed card, a note in a drawer — you can use it instead of your Apple ID password to reset your login password.
At the login screen, click "Reset Password" and select "Use a recovery key" instead of entering your Apple ID. Type or paste the recovery key. macOS will then ask you to create a new login password. This route works even if you have forgotten your Apple ID password, as long as you have the recovery key.
If you never wrote down your recovery key and cannot find it, this route is closed to you. Apple does not have a copy of your recovery key and cannot retrieve it.
Unlocking with another Mac or iPhone in your account
If you have an iPhone, iPad, or another Mac already signed into the same Apple ID, you can use it to reset your password without needing to remember your Apple ID password. On your locked MacBook Air, click "Reset Password" at the login screen. When prompted, select "Use another Apple device".
On your iPhone or other Mac, you will see a notification asking you to approve the password reset. Tap or click "Allow". Your iPhone or Mac will then display a temporary code. Enter this code back into your locked MacBook Air. After verification, you can set a new login password.
This method requires that your other device is powered on, nearby, and connected to Wi-Fi or cellular. If your other device is offline or signed out of your Apple ID, this route will not work.
What to do if you have no Apple ID or cannot access any recovery method
If you do not have an Apple ID, never set up two-factor authentication, have no recovery key, and have no other Mac or iPhone in your account, you have reached the end of the password-reset routes. Your only option is to erase your Mac and set it up again from scratch.
To do this, restart your Mac and hold Command + R as it boots. This launches Recovery Mode. From the Utilities menu, select "Erase Mac". Choose your startup disk and confirm. macOS will erase everything on your drive, including all your files, applications, and settings. After the erase completes, you can set up your Mac as a new device and create a new login password.
If you have a Time Machine backup from before you were locked out, you can restore from that backup after setup is complete. If you do not have a backup, your data is gone. This is why backing up regularly matters.
Preventing lockout: what to set up now
The easiest way to avoid this situation is to set up two-factor authentication on your Apple ID before you need it. Go to Settings on your iPhone or Mac, tap or click your name, then select "Password & Security". Turn on two-factor authentication. Apple will generate a recovery key — write it down or save it in a password manager you trust.
You should also set up a password manager (like 1Password, Bitwarden, or the built-in Keychain) to store your Apple ID password somewhere you can retrieve it even if you are locked out of your Mac. If you use iCloud Keychain, make sure you know your Apple ID password separately, because you will need it to reset your login password.
Finally, set up Time Machine backups. Connect an external drive to your Mac, open System Settings, go to General > Time Machine, and click "Add Backup Disk". Select your external drive. Time Machine will then back up your entire Mac automatically. If you ever need to erase and set up again, you can restore all your files and settings from this backup.
Frequently Asked Questions
Can I unlock my MacBook Air using Touch ID or Face ID?
No. Touch ID and Face ID can only unlock your Mac if you are already logged in. At the login screen, you must use your password or one of the password-reset methods described above. If you have set up a login password for a different user account on the same Mac, you can log in as that user and then change the locked account's password from System Settings.
What if my Mac is not connected to the internet?
The "Reset Password" button will not appear on the login screen if your Mac cannot reach the internet. Connect to Wi-Fi or plug in an Ethernet cable, then restart your Mac. If you cannot connect to the internet at all, you will need to use a recovery key or another device, or erase and set up again.
Can I unlock my MacBook Air using my iPhone's Siri?
No. Siri cannot unlock your Mac or reset your password. You must physically interact with your MacBook Air's login screen or use Recovery Mode. Your iPhone can only help by approving a password reset or providing a verification code.
Will resetting my password delete my files?
No. Resetting your password using your Apple ID, a recovery key, or another device does not erase any files or settings. Only erasing your Mac in Recovery Mode deletes everything, and that is a last resort when no other method works.
What if I see a message saying my account is locked?
This usually means you or someone else entered the wrong password too many times. Wait a few minutes and try again. If the message persists, restart your Mac. If you still cannot log in after restart, use the "Reset Password" button to reset your password using your Apple ID or recovery key.