How to reduce the time Windows takes to report a password is wrong?

9,328

Solution 1

First as a direct Windows 7 answer from MSDN, the OS is built with the following decision branching for password validation:

  1. Entering a wrong password causes Windows 7 to iterate through its password caching in order to compare all entries. This causes a delay.

  2. If nothing matched in the cache, the computer then has to contact the Domain Controller to validate the password against the account. This causes a delay.

  3. Then when all else has failed in testing for a valid password, you hit the standard bad password delay. For the reasons mentioned over on ServerFault.

After reviewing password policy on Microsoft Technet for Windows 7, Server 2003, Server 2008, the following settings are possible:

Password History, Minimum Password Length, Maximum Password Age, Minimum Password Age, ObservationWindow, LockoutDuration, LockoutThreshold, badPasswordTime, badPwdCount, ntPwdHistory, ForceUnlockLogon

If you're on a domain, this would be set through a GPO and out of your control, however; locally for a computer on a workgroup, you can make the settings through SecPol.msc under Security Settings -> Account Lockout Policy

The only setting even close, badPasswordTime, is the timestamp the last bad password was entered.

In all the settings, nothing references failed password delay, so it's apparently hard coded into the OS.

Now if you're on Linux, you can add parameters to PAM to allow removal of this delay, if it was set up to accept the parameter, otherwise, you have to recompile the pam module that controls this function with settings of your own choice.

Solution 2

In my case I found that the lag was caused by contacting the domain controller over wifi. This step is only possible if you're connected to the internet, so it is possible to set up a script that disables network adapters on logoff, workstation lock and workstation idle, and re-enables them when you log back in.

For instance, add a scheduled task that triggers on workstation lock with an action to disable the wifi network adapter

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command "Disable-NetAdapter -Name WiFi -Confirm:$false"

You can find the names of your network adapters in powershell

netsh interface show interface

Add a similar script to the group policy logoff. Then do the same with Enable-NetAdapter

Share:
9,328

Related videos on Youtube

einpoklum
Author by

einpoklum

Made my way from the Olympus of Complexity Theory, Probabilistic Combinatorics and Property Testing to the down-to-earth domain of Heterogeneous and GPU Computing, and now I'm hoping to bring the gospel of GPU and massive-regularized parallelism to DBMS architectures. I've post-doc'ed at the DB architecture group in CWI Amsterdam to do (some of) that. I subscribe to most of Michael Richter's critique of StackOverflow; you might want to take the time to read it. If you listen closely you can hear me muttering "Why am I not socratic again already?"

Updated on September 18, 2022

Comments

  • einpoklum
    einpoklum over 1 year

    I use Windows 7 on a Lenovo laptop. When I enter a wrong password, either when I'm connected to our network or when disconnected, it takes quite a lot of time for Windows to report the password is wrong. And by 'a long time' I mean as much as 20-30 seconds sometimes. Now, even, say, 5 is a lot, I would say - so whatever I can do to reduce this, I want to do (including any artificial security-related delay for incorrect passwords).

    • Admin
      Admin over 10 years
      Have you seen this (over on ServerFault) yet? Why windows 7, “wrong password ” takes long time? I think the answer to 'how to reduce it' is: "You can't, it's a security feature hard-coded into the OS".
    • Admin
      Admin over 10 years
      Those answers are ridiculous. That's not 'quick'. If you can enter a password - even using some computerized keyboard replacement - once every second it would still take you a ridiculous amount of time to brute-force anything. Plus, the delay could be on the 3rd, or 5th, or 10th attempt onwards. ... but regardless of this, none of the answers there says "hard-coded"; plus we're dealing with a delay that's longer than what I experience on other machines.
    • Admin
      Admin over 10 years
      Sorry you don't like standard security features. Just don't enter bad passwords and you'll be ok. Keyboarding classes? Roboform like password safe?
    • Admin
      Admin over 10 years
      @FiascoLabs: Thanks for lecturing me, I feel much more enlightened. Now I really like unconfigurable default 'security' features.
    • Admin
      Admin over 10 years
      You're very welcome! When you find the answer, you can post back and take credit for it. At least you're not hitting an unreasonable password failure lockout. Now that's really annoying. The best is 2 tries and a permanent lockout, with call needed to unlock. Then you know your IT department likes making life a pain.
    • Admin
      Admin over 10 years
      Windows 8 seems to have increased the lockout delay to the point where it's literally quicker to forcefully shutdown the computer and reboot after entering a wrong password, rather than wait for the timeout to pass.
  • einpoklum
    einpoklum over 10 years
    But I bet there's some sort of timeout for when you can't contact the domain controller...
  • einpoklum
    einpoklum over 9 years
    Also, why would iterating the caches cause a delay? And why does contacting the domain controller take so much time?