Limit password to characters or numbers
This avoids crazy characters which are hard to type
This commit is contained in:
parent
1b341b87e1
commit
a08f0b52d1
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue