What to do if you cannot log in to your computer
If you cannot log in to your computer, your first step depends on what kind of lock you are facing. The most common scenario is a forgotten password on a Windows or Mac machine — and both operating systems have built-in recovery paths that work without calling anyone. If you are locked out of a work computer, contact your IT department or help desk before trying anything else, because they may have security policies that prevent self-recovery. If your computer is frozen or unresponsive rather than asking for a password, the solution is different and usually involves a restart.
The method you use also depends on whether you set up a recovery email, a phone number, or security questions when you created your account. If you did, unlocking is straightforward. If you did not, the process takes longer but is still possible on most machines.
Key Takeaways
- Windows computers with a Microsoft account can be unlocked by resetting your password through the login screen using a recovery email or phone number.
- Mac computers let you reset your password using your Apple ID, or through Recovery Mode if you do not remember your Apple ID password.
- Work computers should not be unlocked on your own — contact your IT department or help desk first, as they control access policies.
- If your computer is frozen rather than locked, try a hard restart by holding the power button for 10 seconds, then turning it back on.
- Local user accounts without recovery options require more steps, including booting into Safe Mode or using password reset disks created before the lockout.
Unlocking a Windows computer with a Microsoft account
If you use a Microsoft account to log in to Windows, you have the fastest recovery path. On the login screen, click "I forgot my password" below the password field. Windows will ask you to verify your identity using either the email address or phone number linked to your Microsoft account.
If you choose email recovery, Microsoft sends a link to that address. Open the email on any device with internet access, click the link, and follow the prompts to create a new password. If you choose phone recovery, Microsoft texts or calls a verification code to the number on file. Enter that code on the login screen, then create a new password. Either way, you can log in with your new password within a few minutes.
If you do not have access to the recovery email or phone number, you can still reset your password through Microsoft's account recovery page on any other device. Go to account.microsoft.com, click "Security", then "Password", and follow the prompts. You will need to answer security questions or provide other proof of identity that you set up when the account was created.
Unlocking a Mac using your Apple ID
On a Mac, if you forget your login password, click "Reset Password" on the login screen. The system will ask you to enter your Apple ID and password. Once you do, you can create a new login password without restarting or using Recovery Mode.
If you do not remember your Apple ID password, restart your Mac and hold down Command + R when ready after you hear the startup sound. This boots your Mac into Recovery Mode. Once the Recovery window opens, go to Utilities menu and select "Reset Password". Choose your user account from the dropdown, then follow the prompts. You will need to answer security questions or provide the phone number and email linked to your Apple ID.
If you cannot remember your Apple ID password and do not have access to your recovery email or phone, you will need to visit an Apple Store or contact Apple Support. They can verify your identity and help you regain access to your account.
What to do if you are locked out of a work computer
Do not attempt to reset a work computer password on your own. Work machines are managed by your company's IT department, and they have security policies in place that prevent self-service password resets. Trying to bypass these policies can trigger security alerts or lock your account further.
Instead, contact your IT help desk or IT department directly. They have the tools to verify your identity and unlock your account. Most companies have a phone number, email, or ticketing system for IT support — check your employee handbook, company intranet, or the login screen itself, which often displays IT contact information. If you are working remotely, the help desk can usually unlock you within minutes over the phone.
Restarting a frozen or unresponsive computer
If your computer is not asking for a password but is instead frozen, unresponsive, or stuck on a loading screen, a restart is usually the first fix. On Windows, hold down the power button for 10 seconds until the screen goes black. Wait 30 seconds, then press the power button once to turn it back on. On a Mac, hold down Command + Control + Power to force a restart.
If the computer restarts and you reach the login screen normally, you are no longer locked out — you just needed to clear a temporary freeze. If it freezes again during startup, restart once more and try booting into Safe Mode. On Windows, restart and press F8 repeatedly as the computer starts up. On Mac, restart and hold Shift when ready after the startup sound. Safe Mode loads only essential programs and can help you troubleshoot what is causing the freeze.
Unlocking a local user account without recovery options
If you use a local user account (not connected to Microsoft or Apple) and did not set up a recovery email or phone number, unlocking requires more steps. The easiest method is to use a password reset disk if you created one before the lockout. Plug the disk into your computer, go to the login screen, click "Reset password", and follow the prompts to create a new password.
If you do not have a reset disk, you can boot into Safe Mode and try logging in with a blank password or a default password you may have set. On Windows, restart and press F8 during startup, then select "Safe Mode with Command Prompt". On a Mac, restart and hold Shift during startup. From there, you can attempt to reset the password using system tools, though the exact steps vary by operating system version.
If neither of these methods works, you may need to reinstall your operating system, which erases the drive. Before doing this, contact the computer manufacturer's support line or a local computer repair shop — they can sometimes recover access without data loss.
Preventing lockouts in the future
Once you regain access to your computer, take steps to avoid another lockout. Write your password in a find location — a password manager like Bitwarden or 1Password is ideal, or a locked drawer at home. Set up a recovery email and phone number in your account settings so you have multiple ways to reset your password if you forget it again.
On Windows, go to Settings > Accounts > Security info and add a recovery email and phone number. On a Mac, go to System Preferences > Users & Groups, select your account, and click "Reset Password" to see your recovery options. If you use a local account, create a password reset disk and store it somewhere safe — you can do this on Windows through Control Panel > User Accounts > "Create a password reset disk".
Frequently Asked Questions
Can I unlock my computer without knowing any recovery information?
It depends on your setup. If you use a Microsoft or Apple account, you can recover access through their websites even if you do not have the recovery email or phone on hand — you will just need to answer security questions. If you use a local account with no recovery options, you will need a password reset disk or will have to reinstall your operating system.
How long does it take to unlock a Windows computer?
If you have a recovery email or phone number set up, you can unlock within minutes. If you need to use security questions or contact Microsoft support, it may take a few hours. Work computers can usually be unlocked by IT within the same business day.
What if I keep getting an error message when I try to reset my password?
Check that you are entering the correct recovery email or phone number — typos are common. If the error persists, your account may have additional security flags. Contact Microsoft Support (for Windows) or Apple Support (for Mac) with proof of identity, and they can manually reset your password.
Is it safe to use online password reset tools I find in a search?
No. Only use password reset tools from Microsoft, Apple, or your company's official IT support. Third-party tools claiming to unlock computers are often scams or malware. Stick to the official recovery methods described in this guide.
What should I do if my computer is asking for a PIN instead of a password?
A PIN is usually set up on Windows 10 and later. Click "I forgot my PIN" on the login screen, and Windows will guide you through resetting it using your Microsoft account password or recovery email. The process is the same as a password reset.