From 261770dec53ece404a247e17e18677a2a20d8415 Mon Sep 17 00:00:00 2001 From: thorstenspille Date: Tue, 5 Jul 2022 20:58:03 +0200 Subject: [PATCH] Change password generation to dynamic length --- src/functions.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/functions.sh b/src/functions.sh index fa37998..0a89013 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -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} } \ No newline at end of file