From 49e3fce395538229f9667bc5f9e13730e6810dff Mon Sep 17 00:00:00 2001 From: naturallaw77 Date: Wed, 7 Jun 2023 09:29:08 -0700 Subject: [PATCH] updated reseter source script --- .../Master_Passwords_Reset.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 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 2c8b9ad..6c2dcb1 100644 --- a/Sovran_SystemsOS_Reseter/Reseter Source Files/Master_Passwords_Reset.sh +++ b/Sovran_SystemsOS_Reseter/Reseter Source Files/Master_Passwords_Reset.sh @@ -67,28 +67,29 @@ fi -PASSWDNEW=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password" +PASSWDNEW=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password") + +ssh-keygen -q -N "$PASSWDNEW" -t ed25519 -f /home/free/.ssh/sovranpro_login - if [[ $? -eq 1 ]]; then +if [[ $? -eq 1 ]]; then exit 1 - fi) + else -ssh-keygen -q -N "$PASSWDNEW" -t ed25519 -f /home/free/.ssh/sovranpro_login + if [[ $? != 0 ]]; then - -if [[ $? != 0 ]]; then - -zenity --error \ + zenity --error \ --ellipsize \ --no-wrap \ --title="Sovran_SystemsOS_Reseter" \ --text="Could Not Reset Sovran Pro Login Passwords" exit 1 -fi + + fi +fi ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'sed -i -e "0,/ssh-ed25519.*/{ s::$(cat /home/free/.ssh/sovranpro_login.pub): }" /root/.ssh/authorized_keys'