Reset your password using your Apple ID
If you have forgotten your MacBook Air password, the fastest way back in is through your Apple ID. When you reach the login screen, click the question mark icon below the password field, or wait for the hint to appear after a few failed attempts. This will show you a reset option tied to your Apple ID account.
Click "Reset it" or the arrow next to the password field. You will be asked to enter your Apple ID email and password. Once you do, macOS will let you create a new login password right there on the login screen. You do not need to restart or use another computer — this works directly from the locked screen.
This method works only if you set up your Mac with an Apple ID and have not disabled this feature in System Settings. If you do not remember your Apple ID password either, you will need to reset that first through iforgot.apple.com before you can use this method.
Key Takeaways
- Your Apple ID is the fastest way to reset a forgotten password on the login screen itself, without restarting or using another device.
- If you do not have an Apple ID set up on your Mac, you will need to use Recovery Mode instead, which takes longer and requires more steps.
- Recovery Mode lets you reset your password through System Settings, but you must restart your Mac and hold Command-R during startup.
- If you have a second administrator account on the same Mac, you can log in with that account and change the forgotten password from System Settings.
- If none of these options work, you may need to erase your Mac and reinstall macOS, which erases all data on the drive.
Use Recovery Mode to reset through System Settings
If your Apple ID method does not work, or you do not have an Apple ID linked to your Mac, Recovery Mode gives you another path. Restart your MacBook Air and when ready hold down Command + R until you see the Apple logo or a spinning globe. Keep holding until the macOS Utilities window appears — this usually takes 30 seconds to a minute.
Once in Recovery Mode, click Utilities in the menu bar, then select Terminal. Type resetpassword and press Enter. A password reset window will open. Select your Mac's hard drive from the dropdown, then select your user account. Enter a new password twice, add a password hint if you want, and click Save.
Restart your Mac when prompted. You should now be able to log in with your new password. This method works even if your Apple ID is not set up, but it does require you to remember your Mac's hard drive name and have access to the keyboard during startup.
Reset the password from another administrator account
If someone else has an administrator account on your Mac, they can change your password without Recovery Mode. Have them log in with their account, then open System Settings and go to General > Users & Groups (or Users & Groups in older macOS versions).
They should click the lock icon in the bottom left, enter their own password, then select your account from the list on the left. Click the gear icon at the bottom and choose "Reset Password." They can then set a new password for your account without needing your old one.
This is the simplest method if another administrator is available, because it does not require Recovery Mode or an Apple ID reset. The person resetting your password will see your account name and can create a temporary password for you to change later.
What to do if you do not have an Apple ID or another admin account
If you have no Apple ID linked to your Mac and no other administrator account exists, Recovery Mode is your only option short of erasing the drive. Follow the Recovery Mode steps above — they will work regardless of whether an Apple ID is set up.
If Recovery Mode does not open or the Terminal method does not work, your Mac may have a firmware password set. This is a security feature that prevents anyone from booting into Recovery Mode without a password. If you set this yourself and forgot it, you will need to contact Apple Support with proof of ownership to have it removed.
Erase and reinstall macOS as a last resort
If none of the above methods work, you can erase your Mac and reinstall macOS. This erases all data on your drive, so use this only if you have backups elsewhere and have exhausted all other options.
Restart your Mac and hold Command-R to enter Recovery Mode. Click Utilities, then Disk Utility. Select your Mac's hard drive from the left sidebar, click Erase, choose a format (APFS for newer Macs, Mac OS Extended for older ones), and confirm. Once erasing finishes, quit Disk Utility and click "Reinstall macOS" from the Utilities window. Follow the prompts to read and install a fresh copy of macOS.
When setup completes, you will create a new account and password from scratch. This method is destructive and should be your last choice, but it will always work if your Mac can still start up.
Prevent this from happening again
Once you are back in your Mac, set up a password reset option so you do not get locked out again. Go to System Settings, click General, then Users & Groups. Select your account and click Password. Check the box next to "Allow user to reset password using Apple ID" if it is not already checked.
You can also write your password hint in a place you will remember — System Settings lets you set or change this hint on the login screen. If you use iCloud Keychain, your passwords are backed up to your Apple ID, which makes recovery easier if you ever need it.
Frequently Asked Questions
Can I reset my password without restarting my Mac?
Yes, if you have your Apple ID set up. Click the question mark on the login screen and select the reset option. You can create a new password without restarting. If you do not have an Apple ID, you will need to restart and use Recovery Mode.
What if I forgot both my Mac password and my Apple ID password?
Go to iforgot.apple.com on another device and reset your Apple ID password first. Once you have access to your Apple ID again, use the login screen reset method on your Mac. If you cannot access another device, use Recovery Mode and the Terminal method instead.
Will resetting my password delete my files?
No. Resetting your password through Apple ID, Recovery Mode, or another admin account does not delete any files. Only the "erase and reinstall" method deletes data, and that is a last resort when nothing else works.
How long does Recovery Mode take?
Entering Recovery Mode takes about 30 seconds to a minute. Resetting your password through Terminal takes another minute or two. The entire process is usually done in under five minutes, though older Macs may take longer to start up.
Can I prevent someone else from resetting my password?
Yes. Set a firmware password in Recovery Mode (Utilities > Firmware Password Utility) to prevent anyone from booting into Recovery Mode without the password. You can also disable the Apple ID reset option in System Settings if you prefer not to use it.