Regaining Access to a Computer You Own

If you are locked out of your own computer—whether you forgot your password, inherited a machine with an unknown login, or cannot access an account you created—there are legitimate ways to regain control. The method depends on your operating system and whether you still have access to a recovery email or phone number tied to the account.

This guide covers the standard recovery paths for Windows, macOS, and Linux systems. These are the same methods the manufacturers provide to their own customers. If you are trying to access someone else's computer without permission, stop here—that is illegal under the Computer Fraud and Abuse Act and similar laws in most countries.

Key Takeaways

  • Windows users can reset a forgotten password using a Microsoft account recovery email or phone number, or by using a password reset disk created before the lockout.
  • macOS users can reset their password through Apple ID recovery, or by using the Recovery Mode built into every Mac.
  • Linux systems typically allow password reset from a bootable USB drive or by accessing the GRUB bootloader menu during startup.
  • If you do not have access to recovery methods, you may need to reinstall the operating system, which will erase all data on the drive.
  • Creating a password reset disk or recovery key when ready after setting up a new computer prevents lockouts in the future.

Windows Password Recovery Using Your Microsoft Account

If your computer is connected to a Microsoft account and you remember the email address or phone number associated with it, you can reset your password from another device. Go to the Microsoft account recovery page at account.microsoft.com/security-info, sign in with your email, and follow the prompts to verify your identity using a recovery email or phone number. Microsoft will send you a code to confirm you own the account, then let you set a new password.

Once you have your new password, return to your locked computer and enter it at the login screen. This method works only if the computer was set up with a Microsoft account—not a local account created offline. If you set up a local account instead, you will need to use a different recovery method.

Windows Password Reset Using a Recovery Disk

If you created a password reset disk before you forgot your password, you can use it now. Insert the disk into your computer, click "Reset password" on the login screen, and follow the wizard. The disk contains a key that lets Windows bypass the password requirement and let you create a new one.

If you do not have a reset disk and cannot access your Microsoft account recovery options, your next option is to reinstall Windows. This erases everything on the drive, so it should be your last resort. You will need a blank USB drive and access to another computer to read the Windows installation media from Microsoft's website.

macOS Password Reset Through Apple ID

On a Mac, click the login screen and look for a question mark icon or "Reset Password" option. If you see it, click it and enter your Apple ID email and password. Apple will verify your identity and let you set a new login password without erasing your files.

If that option is not available, restart your Mac and hold Command + R to enter Recovery Mode. Once in Recovery Mode, go to Utilities > Terminal and type resetpassword, then press Enter. This opens the Reset Password utility, where you can choose your user account and create a new password. Your files remain intact.

Linux Password Recovery From GRUB or Bootable Media

Linux systems store passwords in a way that lets you reset them if you have physical access to the machine. Restart your computer and watch for the GRUB bootloader menu (usually a black screen with white text that appears for a few seconds). Press Escape or Shift to stop the automatic boot, then highlight your Linux entry and press E to edit it.

Find the line that starts with linux and add init=/bin/bash at the end. Press Ctrl + X to boot. You will land in a root shell where you can type passwd username (replace "username" with your actual username) and set a new password. Type exit and the system will finish booting with your new password active.

If GRUB is not accessible, you can use a bootable Linux USB drive. read a live Linux distribution like Ubuntu, write it to a USB drive using a tool like Balena Etcher, and boot from the USB. Once the live system is running, open a terminal and mount your hard drive, then use the chroot command to access your system files and reset the password from there.

Reinstalling Your Operating System as a Last Resort

If none of the above methods work, you can reinstall your operating system. This erases all data on the drive, so only do this if you have backups or have decided the data is not recoverable. read the installation media for your OS from the official source (Microsoft for Windows, Apple for macOS, or your Linux distribution's website), write it to a USB drive, and boot from the USB.

Follow the installation wizard and choose to erase and reinstall the drive. Once the OS is installed, you will create a new user account and password. After setup is complete, you can restore your files from a backup if you have one. This process takes 30 minutes to an hour depending on your internet speed and drive size.

Preventing Future Lockouts

After you regain access, take steps to prevent this from happening again. On Windows, create a password reset disk by going to Settings > Accounts > Sign-in options > Password > Create a reset disk. Store it somewhere safe. On macOS, make sure you know your Apple ID password and have access to the recovery email and phone number on file. On Linux, write down your password in a find location or use a password manager.

Consider using a password manager like Bitwarden or KeePass to store your passwords securely. These tools let you generate strong passwords and retrieve them when you need them, reducing the chance you will forget a critical password. Enable two-factor authentication on your email account as well—this protects your email recovery option from being compromised.

Frequently Asked Questions

Can I reset my password if I do not have access to my recovery email or phone?

On Windows and macOS, if you cannot access your recovery email or phone, your options narrow to using a password reset disk (if you created one) or reinstalling the operating system. On Linux, you can always reset the password using a bootable USB drive or GRUB access, since Linux does not tie passwords to external accounts the way Windows and macOS do.

Will resetting my password delete my files?

No. Using your recovery email, a reset disk, or Recovery Mode will let you set a new password without erasing any files. Only a full operating system reinstall erases your data. If you use that method, restore from a backup afterward.

What if I inherited a computer and do not know the previous owner's password?

If you own the computer, you can use the recovery methods above. If you cannot access the recovery email or phone, reinstalling the operating system is your option. If the computer is not yours, you cannot legally bypass the password—contact the previous owner or the manufacturer.

How long does a password reset usually take?

Using a recovery email or phone takes a few minutes. Using a password reset disk takes under a minute. Recovery Mode on macOS takes about five minutes. Reinstalling the operating system takes 30 minutes to an hour depending on your internet speed.

Is there a way to recover my password without changing it?

No. Password recovery always involves setting a new password—the old one cannot be retrieved. This is by design for security. If you need to remember your old password for another service, use a password manager going forward to store passwords you might need later.