Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you enforce strong passwords?

There are many techniques to enforce strong passwords on website:

  • Requesting that passwords pass a regex of varying complexity
  • Setting the password autonomously, so that casual users have a strong password
  • Letting passwords expire
  • etc.

On the other hands there are drawbacks, because all of them make life less easy for the user, meaning less registrations.

So, what techniques do you use? Which provide the best protection vs. inconvenience ratio?

To clear things up, I am not referring to banking sites or sites that store credit cards. Think more in terms of popular (or not-so-popular) sites that still require registration.

like image 586
Sklivvz Avatar asked Oct 03 '08 17:10

Sklivvz


People also ask

What method is used to make a strong password?

The key aspects of a strong password are length (the longer the better); a mix of letters (upper and lower case), numbers, and symbols, no ties to your personal information, and no dictionary words.


2 Answers

I don't think it's possible to enforce strong passwords, but there are lots of things you can do to encourage them as much as possible.

  • Rate each password and give the user feedback in the form of a score or a graphical bar, etc.
  • Set a minimum password score to weed out the awful ones
  • Have a list of common words that are either banned, or tank the password score

One excellent trick I like to use is to have the password's expiry date tied to the password score. So stronger passwords don't need to be changed so often. This works particularly well if you can give users direct feedback about how long the password they've chosen will live for (and dynamically update it so they can see how adding characters affects the date).

like image 129
Dan Avatar answered Oct 22 '22 09:10

Dan


Don't enforce anything ... if you are not protecting financial information or something equally important, then don't make the user choose a strong password.

I have the same weak password on a whole load of sites that require registration for forums, etc. I don't really care if someone guesses it and can post messages as me (and don't think there is much motivation for someone to do so). What I can't do is remember different strong passwords for a dozen sites and don't really want to use another piece of software to manage them for me.

The best compromise would be to show some kind of feedback to the user on how strong the password is (based on whether it is a dictionary word, number of different character types, length, etc).

like image 26
Rob Walker Avatar answered Oct 22 '22 08:10

Rob Walker