From 3e07d35312c8de83540d946fd11e890040449a86 Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Sat, 17 Jun 2023 18:52:29 -0700 Subject: [PATCH] updated master script --- .../Master_Passwords_Reset.sh | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/Sovran_SystemsOS_Reseter/Reseter Source Files/Master_Passwords_Reset.sh b/Sovran_SystemsOS_Reseter/Reseter Source Files/Master_Passwords_Reset.sh index 8956500..7de1d12 100644 --- a/Sovran_SystemsOS_Reseter/Reseter Source Files/Master_Passwords_Reset.sh +++ b/Sovran_SystemsOS_Reseter/Reseter Source Files/Master_Passwords_Reset.sh @@ -40,9 +40,9 @@ FILE=/var/lib/beacons/reseter/completed #### Initial Reseter Tag #### - ssh -i /home/free/.ssh/factory_login root@${ID} 'mkdir /var/lib/beacons/reseter ; touch /var/lib/beacons/reseter/started' +ssh -i /home/free/.ssh/factory_login root@${ID} 'mkdir /var/lib/beacons/reseter ; touch /var/lib/beacons/reseter/started' - if [[ $? != 0 ]]; then + if [[ $? != 0 ]]; then zenity --error \ --ellipsize \ @@ -50,23 +50,23 @@ FILE=/var/lib/beacons/reseter/completed --title="Sovran_SystemsOS_Reseter" \ --text="Could Not Create Reseter Tag" - exit 1 - fi + exit 1 + fi #### Create New Log In Key For the Local Sovran Pro #### - PASS=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password") +PASS=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password") - if [[ $? -eq 1 ]]; then + if [[ $? -eq 1 ]]; then - exit 1 + exit 1 - else + else - ssh-keygen -q -N "${PASS}" -t ed25519 -f /home/free/.ssh/sovranpro_login + ssh-keygen -q -N "${PASS}" -t ed25519 -f /home/free/.ssh/sovranpro_login - if [[ $? != 0 ]]; then + if [[ $? != 0 ]]; then zenity --error \ --ellipsize \ @@ -74,13 +74,13 @@ FILE=/var/lib/beacons/reseter/completed --title="Sovran_SystemsOS_Reseter" \ --text="Could Not Create New Login Key" - exit 1 - fi + exit 1 + fi ssh -i /home/free/.ssh/factory_login root@${ID} 'sed -i -e "0,/ssh-ed25519.*/{ s::$(cat /home/free/.ssh/sovranpro_login.pub): }" /root/.ssh/authorized_keys' - if [[ $? != 0 ]]; then + if [[ $? != 0 ]]; then zenity --error \ --ellipsize \ @@ -88,9 +88,9 @@ FILE=/var/lib/beacons/reseter/completed --title="Sovran_SystemsOS_Reseter" \ --text="Could Not Move Key to Root" - exit 1 - fi - fi + exit 1 + fi + fi rm -rf /home/free/.ssh/factory_login /home/free/.ssh/factory_login.pub