How to regain access to your computer when you don't know the admin password
If you cannot log in as administrator, your options depend on what operating system you use and whether you set up a password recovery method when you created the account. Windows and Mac both have built-in recovery paths that work without knowing the original password. Linux systems vary by distribution. The fastest route is usually a password reset disk or a linked email account — both let you set a new password without erasing your files.
What you cannot do is bypass the password entirely without losing data or reinstalling the system. Any method that skips authentication will wipe your drive or require you to prove ownership through another account or device you control.
Key Takeaways
- Windows lets you reset a forgotten admin password using another administrator account, a Microsoft account recovery email, or a password reset disk if you made one beforehand.
- Mac users can reset the admin password through an Apple ID, a recovery key, or by booting into Recovery Mode and using the Reset Password utility.
- If you have no recovery method set up, you will need to reinstall the operating system, which erases all files unless you back them up first.
- The fastest solution is to use a second administrator account on the same computer if one exists.
Windows: using another admin account or Microsoft account recovery
If you have a second administrator account on the same computer, log into that account and reset the forgotten password from there. Open Settings, go to Accounts, select the account you cannot access, and choose "Reset password". You will be prompted to answer security questions or verify through email if you set those up.
If you only have one account, check whether it is linked to a Microsoft account (your email address). Go to the Windows sign-in screen, select "I forgot my password", and follow the prompts to verify your identity through a recovery email or phone number. Microsoft will send you a link to set a new password. This works even if you cannot log in to the computer itself.
If your account is local (not linked to Microsoft) and you have no second admin account, you will need a password reset disk. If you created one before losing access, plug it in at the sign-in screen and select "Reset password". If you did not create one, you will need to reinstall Windows.
Mac: using Apple ID or Recovery Mode
On the login screen, enter your password incorrectly three times. A "Reset Password" button will appear. Click it and sign in with your Apple ID. You can then set a new administrator password without losing any files.
If you do not remember your Apple ID password, restart your Mac and hold Command + R to enter Recovery Mode. Once the utilities menu appears, select "Reset Password" from the Utilities menu. Choose your account and set a new password. This method also preserves your files.
If you have a recovery key (a code Apple gave you when you set up two-factor authentication), you can use that instead of your Apple ID password. If you have none of these options, you will need to reinstall macOS, which requires erasing the drive first.
Linux: using single-user mode or a live USB
Most Linux distributions let you boot into single-user mode or recovery mode by holding Shift during startup (on systems using GRUB) or by selecting a recovery option from the boot menu. Once in that mode, you can access a root shell and reset the password for any user account using the passwd command.
If single-user mode is password-protected, create a bootable USB with a Linux live environment (Ubuntu, Fedora, or another distribution). Boot from the USB, mount your hard drive, and use command-line tools to reset the password or access your files. This method requires some familiarity with the terminal.
What happens if you have no recovery method
If you cannot use any of the above methods, you will need to reinstall your operating system. This erases everything on the drive unless you back it up first. To back up without logging in, boot from a live USB or recovery disk, mount your drive, and copy your files to an external drive.
After backing up, insert your operating system installation media (a USB drive or DVD), restart the computer, and follow the installation prompts. You will be asked to create a new administrator account. Once installation is complete, you can restore your backed-up files.
Preventing this in the future
Create a password reset disk on Windows (Settings > Accounts > Sign-in options > Password > Create a password reset disk) or save your recovery key on Mac (System Settings > General > About > System Settings > [Your Name] > Password). Write down security questions and keep the answers somewhere safe.
If you use a Microsoft or Apple account, make sure your recovery email and phone number are current. Test your recovery method once to confirm it works before you need it.
Frequently Asked Questions
Can I reset the admin password without erasing my files?
Yes, if you have a recovery method set up — a second admin account, a linked email, a password reset disk, or an Apple ID. All of these let you set a new password while keeping your files intact. If you have none of these, reinstalling the OS will erase everything unless you back it up first.
What if I forgot both my password and my recovery email?
On Windows, you can still use a password reset disk if you created one. On Mac, a recovery key works if you saved it. If you have neither, you will need to reinstall the operating system. Contact the manufacturer's support line with proof of purchase — they may be able to help verify your identity.
Is there a way to bypass the password without reinstalling?
No. Any method that skips authentication requires either a recovery method you set up beforehand or a reinstall. There is no universal bypass that preserves your files and does not require proof of ownership.
How long does a password reset usually take?
Using a recovery email or second admin account takes minutes. Reinstalling the operating system takes 30 minutes to an hour, plus time to restore your backed-up files. Creating a bootable recovery disk and using it takes 20 to 45 minutes depending on your drive size.
Do I need to contact Microsoft or Apple support?
Not for a password reset — the self-service methods above work without calling anyone. Contact support only if you cannot verify your identity through email or phone, or if you need help with a recovery key or password reset disk.