Change password generation to dynamic length

This commit is contained in:
thorstenspille 2022-07-05 20:58:03 +02:00
parent 03ae4f61d5
commit 261770dec5

View File

@ -1,8 +1,9 @@
#!/bin/bash
#
# This script has basic functions like a random password generator
LXC_RANDOMPWD=32
random_password() {
set +o pipefail
C_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c32
C_CTYPE=C tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c${LXC_RANDOMPWD}
}