Avoid sign '$' in genereted passwords
This commit is contained in:
		| @@ -181,13 +181,12 @@ while read email passwd ; do | ||||
|    ## - | ||||
|    if [[ -z "$passwd" ]]; then | ||||
|       if [[ -z "$_passwd" ]]; then | ||||
|          passwd=`tr -cd '[:alnum:]\!@#$%' < /dev/urandom | fold -w10 | head -n1` | ||||
|          password_accepted=false | ||||
|          while ! $password_accepted ; do | ||||
|             passwd=`tr -cd '[:alnum:]\!@#$%' < /dev/urandom | fold -w10 | head -n1` | ||||
|             regex="[\!@#$%_]" | ||||
|             passwd=`tr -cd '[:alnum:]#_\!\%/=@-' < /dev/urandom | tr '0' 'O'  | fold -w10 | head -n1` | ||||
|             regex="[#_\!\%/=@-]" | ||||
|             [[ $passwd =~ $regex ]] || continue | ||||
|             regex="[0123456789].*[0123456789]" | ||||
|             regex="[123456789].*[123456789]" | ||||
|             [[ $passwd =~ $regex ]] || continue | ||||
|             password_accepted=true | ||||
|          done | ||||
|   | ||||
		Reference in New Issue
	
	Block a user