From: Mike Engel Date: Fri, 24 Jan 2020 17:47:56 +0100 Subject: [PATCH] ahab_pki_tree.sh: use a random password for the default PKI generation Signed-off-by: Mike Engel --- keys/ahab_pki_tree.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/keys/ahab_pki_tree.sh b/keys/ahab_pki_tree.sh index 2c16533..b85b00d 100755 --- a/keys/ahab_pki_tree.sh +++ b/keys/ahab_pki_tree.sh @@ -353,9 +353,10 @@ fi # Check that the file "key_pass.txt" is present, if not create it with default user/pwd: if [ ! -f key_pass.txt ] then - echo "test" > key_pass.txt - echo "test" >> key_pass.txt - echo "A default file 'key_pass.txt' was created with password = test!" + password="$(openssl rand -base64 32)" + echo "${password}" > key_pass.txt + echo "${password}" >> key_pass.txt + echo "A file 'key_pass.txt' was created with a random password!" fi # The following is required otherwise OpenSSL complains