Windows
There are many ways to reset a Windows password. Windows allows you to create a password reset disk that can reset your password in an approved way. Create a disk now, and you can use it if you ever need it.
If you’re using Windows 8 or 10 and you sign in with a Microsoft account, you can also reset your Microsoft account password to regain access to Windows. This is easy as long as you’ve previously associated your Microsoft account with another email address or a mobile phone number you have access to.
Resetting a password without an official tool is doable as well. For example, the Offline NT Password & Registry Editor works well for this. First, you’ll need to boot from a special disc or USB drive, either a live Linux system or a specialized Offline NT Password & Registry Editor boot disc. The tool can edit the Windows registry, allowing you to clear the password associated with the user account. You can then boot into Windows and log into the account without a password. Even if you’re using Windows 8 or 10 with a Microsoft account, you can always reset the password of the built-in Administrator account to gain access.
Full-disk encryption is the best way to prevent people from resetting your password and accessing your files. Make sure you don’t forget the encryption password, though! If you lose the encryption key, there is no way to get your files back—you’ll have to erase your files and reinstall Windows to regain use of the computer.