Basic Login

- Default password is "123456"
- there is a warning on the login page, when the default password is active
- to set ne new password, use the reset_password.sh in the config folder (./reset_password.sh newpassword)
- the password is stored as a sha256 hash
- the script creates a backup of the config file, just in case
This commit is contained in:
leiweibau
2022-07-22 21:21:43 +02:00
parent b855fca9be
commit fec58bf028
9 changed files with 188 additions and 25 deletions

7
config/reset_password.sh Normal file
View File

@@ -0,0 +1,7 @@
cp pialert.conf pialert.conf.bak
PIA_PASS=$1
echo "The password '$1' is hashed"
PIA_PASS_HASH=$(echo -n $PIA_PASS | sha256sum | awk '{print $1}')
echo "The hashed password is: $PIA_PASS_HASH"
sed -i "/PIALERT_WEB_PASSWORD/c\PIALERT_WEB_PASSWORD = '$PIA_PASS_HASH'" pialert.conf
echo "The hash was saved in the configuration file"