[svlug] testing a password with bash.

James Sparenberg james at linuxrebel.org
Thu May 1 03:29:30 PDT 2008


All,

   Bash question for all of you.   I'm putting together a script that reaches 
out to all my systems based on user role, and can either add, del, or update 
a users name/passwd.  Now comes the question.

   I want to be able to verify quality of the password.  # of characters is 
easy.  pipe it through wc -m and see if it's greater than the minimum.  How 
though would you recommend I go about verifying things like 

1.  Not based on Dictionary word.
2.  Has Upper and lower case 
3.  Contains at least 1 number or special character.

Special rules of sort.  It has to work on FreeBSD, RH and Debian.  I run a 
multi-Ethnic environment ;)   here and need to be sure that ever system 
produces the same results.  

Suggestions? (and switching to XYZ lang isn't really an option here.)

James



More information about the svlug mailing list