Click here to Skip to main content
15,921,467 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
one or more time wrong password enter in login page then lock the password and then how to retify it
Posted
Comments
Mehdi Gholam 12-Apr-12 1:14am    
What have you done so far?
Ankur\m/ 12-Apr-12 1:25am    
Are you developing something? Or is it on some website / application? Your question isn't complete.

1 solution

It depends on how you handle your password entry, and what kind of application you are writing. If this is a web site, then I would expect you to be using Membership, which means it needs to be handled within that framework. I you have rolled your own for a windows app say, then it would need to be handled in a different manner.

The basic principle is simple though, and similar to lost password handling:
Count the "bad password" entries.
When he tries to enter a password, check the count: if it exceeds your limit then refuse entry with a "blocked" message.
If it doesn't, then check the password - if it is valid, zero the count.
If it isn't increase the count by one. If it now reached your limit, then send an email to the users email, with a link to follow to reset the password. Then refuse entry with the message as above.

Some systems may require a supervisor to reset the password - it depends on your security protocols.

It is normal to give people three chances though - one strike and your out is a bit draconian!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900