From 33a4c10f7aae5b7361a3665345450195e3b5c7de Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 19 Sep 2018 17:04:42 +0200 Subject: [PATCH] Fix Pandora admin hash generator --- pandora/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandora/setup.sh b/pandora/setup.sh index ccf6e9b..5ae6dad 100755 --- a/pandora/setup.sh +++ b/pandora/setup.sh @@ -45,7 +45,7 @@ lxc-execute pandora -- /srv/pandora/pandora/manage.py sync_documentsort export PANDORA_ADMIN_USER=admin export PANDORA_ADMIN_EMAIL=admin@example.com export PANDORA_ADMIN_PWD=$(head -c 12 /dev/urandom | base64) -export PANDORA_ADMIN_HASH=$(lxc-execute pandora -- sh -c "DJANGO_SETTINGS_MODULE=pandora.settings python3 -c \"from django.contrib.auth.hashers import make_password; print(make_password('${PANDORA_ADMIN_PWD}'))\"") +export PANDORA_ADMIN_HASH=$(lxc-execute pandora -- sh -c "DJANGO_SETTINGS_MODULE=srv.pandora.pandora.settings python3 -c \"from django.contrib.auth.hashers import make_password; print(make_password('${PANDORA_ADMIN_PWD}'))\"") envsubst <${SOURCE_DIR}/adminpwd.sql | lxc-attach -u 5432 -g 5432 postgres -- psql pandora vmmgr update-login pandora "${PANDORA_ADMIN_USER}" "${PANDORA_ADMIN_PWD}"