Limit password to characters or numbers

This avoids crazy characters which are hard to type
This commit is contained in:
Bob Mottram 2017-05-06 16:09:51 +01:00
parent 1b341b87e1
commit a08f0b52d1
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ function enforce_good_passwords {
} }
function create_password { function create_password {
echo "$(openssl rand -base64 32 | cut -c1-${1})" openssl rand -base64 32 | tr -dc A-Za-z0-9 | head -c ${1} ; echo ''
} }
# NOTE: deliberately no exit 0 # NOTE: deliberately no exit 0