X

How to Temporarily Lock the PC if Someone Tries to Access it with a Wrong Password in Windows 10

Many times it happens that you find someone trying to break into your account. It is indeed a very alarming situation because once an intruder gets into your PC; he can do absolutely anything with your private and personal data. This act breaches your privacy. To prevent this from happening, people usually set passwords for their accounts so that anyone who wants to use your account must know your password. Only then, he will be granted an access to your account.

However, do you think that setting up an account password is enough? No, it is not sufficient. Because someone may guess your password by entering some wrong passwords and eventually knowing the correct one. In this case, you need to take some other measures to protect your PC. One such solution is of locking your PC for a while if someone tries to enter a wrong password for some specified amount of times. In this article, we will tell you the method through which you can temporarily lock your PC if someone tries to access it with a wrong password in Windows 10.

Locking the PC Temporarily in Case of Wrong Password Attempt

In order to perform this action, you need to proceed as follows:

Type cmd in the search section of your taskbar and click on the search results to launch the command prompt window.

As soon as you will click on Command Prompt, its window will pop up on the screen. It is shown in the following image:

First, you need to check if you have already set the password limit or not. For doing this, type the command net accounts in your command prompt window and press enter. This command is shown below:

As soon as you will press enter, some information will be displayed on the command prompt which is shown below:

As you can see that the field corresponding to the title “Force user logoff how long after time expires?” is set to Never which means that currently, you have set no limits on wrong password attempts so you will need to modify this in order to protect your PC.

Now you need to define a threshold for failed password attempts so that as soon as the threshold value is reached, your PC is locked automatically. For doing this, type the command:

net accounts /lockoutthreshold:5

and press enter. It means that if someone attempts to enter a wrong password for 5 times, your PC will be locked. You can set any threshold value of your choice. This command is shown in the image below.

As soon as you will press enter, a message will be displayed saying “The command completed successfully” which means that your lockout threshold value is correctly set.

Now, you need to set a lockout duration, which will specify that for how long your PC will be locked after the failed password attempts. For doing this, type the command:

net accounts /lockoutduration:20

and press enter. It means that once the lockout threshold value is reached, your PC will be locked for 20 minutes. You can set any lockout duration value of your choice. This command is shown in the image below.

As soon as you will press enter, a message will be displayed saying “The command completed successfully” which means that your lockout duration value is correctly set.

The last thing you will need to do is to define the time for a retry after the lockout. For this, you will need to set a lockout window. Type the command:

net accounts /lockoutwindow:20

and press enter. It means that you will be able to make a retry after 20 minutes of a lockout. You can set any value of your choice for the lockout window. This command is shown in the image below.

As soon as you will press enter, a message will be displayed on the command prompt saying, “The command completed successfully” which means that your lockout window is correctly set.

You can confirm all the changes you have just made by typing the command net accounts in the command prompt and pressing enter.

Conclusion

In this way, you can protect your PC or your account from being misused by intruders. These changes will be saved in your PC until you reset the settings to default. Now, no one will be able to break into your PC without knowing your password.

Categories: Windows Windows 10
Karim Buzdar: About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various websites.
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings