Why does it take a long time for Windows 7 to show the failed login message when the wrong password is entered when it almost instantaneously lets you login if the password is correct?
Is it only me who is seeing this behavior?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
It is mainly to prevent quick brute forcing of passwords.
This blog article gives you much more information than you probably care for!
So it takes longer to brute force a password.
If this computer is on a domain, using the right password will skip the domain lookup and verify against the cached credentials. If it can't use a cached credential then it has to contact a domain controller, which has several handshakes involved (Kerberos and LDAP at the minimum).
Most OSes (linux and windows are good examples) enforce a retry delay in order to prevent someone from scripting a login to the server and potentially brute forcing or locking out an account without a delay that will (potentially) allow the attempt to get noticed by someone getting failed login alerts. In addition the method of authentication (domain vs local) also has a performance hit on the authentication. Note that in the case of domain passwords the password is verified twice if it fails on a non pdc emulator DC.
I just did a test since I have a similar setup. My machine is Win 7 domain PC, if I am connected to the network my DC is on and enter the password wrong it takes 30 seconds or so to tell me the PW is incorrect. However if I turn my Wifi off or connect to a different network it instantly tells me the password is incorrect. Probably a mix of what Chris S said below and communication between the Domain controller and PC.