2

I have found that in any operating system, when you enter the correct password the password box directly disappears whereas when you type an incorrect password it keeps loading for a second and then desplays the error message.

Let me explain this: login screen

This is an ubuntu login screen but any os would work. So here is what happens:

  • If you enter the correct password, the box (highlighted in red) disappears, you wait a little and you are logged in.

  • If you enter a wrong password, the login box remains, and the circle turns into a throbber for a second and then displays an error message.

Now, the difference between the two scenarios suggest that the code for checking the password doesn't take long (few milliseconds). However, my question is that what happens when you enter a wrong password? Why does the throbber appear if it has already determined that it is an invalid login attempt?

I'm really sorry but it is very hard for me to explain this, and it is very hard to take pictures (or record a video) at the login screen. I hope you could understand what I meant.

I could reproduce this with windows (8) as well.

1

1 Answer 1

1

I'm not completely sure if this is the only reason, but I think this is a measure to thwart attacks like brute-force. Same happens when you use SSH on a server and you fail the password - the next try is delayed a few seconds, oppositely when you succeed entering the password and you join the shell a few milliseconds afterwards.

This might look like insufficient time, but even a second can make much "pain" to a brute-force attack.

Not the answer you're looking for? Browse other questions tagged .