home · contact · privacy
Fix.
authorChristian Heller <c.heller@plomlompom.de>
Tue, 30 Jun 2020 19:33:40 +0000 (21:33 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Tue, 30 Jun 2020 19:33:40 +0000 (21:33 +0200)
buster/setup_scripts/init_user_and_keybased_login.sh
buster/setup_scripts/init_user_login.sh

index 73379c417efd5d8b6c94cb5c3b329e9c508e5d24..298bafacd89f0eea2f2952156c1606ef231cb688 100755 (executable)
@@ -27,12 +27,16 @@ server="$1"
 
 # Ask for root password only once, sshpass will re-use it then often.
 stty -echo
 
 # Ask for root password only once, sshpass will re-use it then often.
 stty -echo
-printf "Server root password: "
+printf "(Old) server root password: "
 read PW_ROOT
 stty echo
 printf "\n"
 export SSHPASS="${PW_ROOT}"
 
 read PW_ROOT
 stty echo
 printf "\n"
 export SSHPASS="${PW_ROOT}"
 
+# This will be used to log-in as root from plom account.
+echo 'Asking for new root password.'
+ssh root@"${server}" "passwd"
+
 # Create user plom, and his ~/.ssh/authorized_keys based on the local
 # ~/.ssh/id_rsa.pub; ensure the result has proper permissions and
 # ownerships. Then disable root and pw login by copying over the
 # Create user plom, and his ~/.ssh/authorized_keys based on the local
 # ~/.ssh/id_rsa.pub; ensure the result has proper permissions and
 # ownerships. Then disable root and pw login by copying over the
index 08598ce8e39ce0504c668f9f40100ef75486e73c..7f3536a6e5bdaaafb607ebc18342c4603dd80e49 100755 (executable)
@@ -20,7 +20,7 @@ eval $(ssh-agent)
 ssh-add
 
 # This will be used to log-in as root from plom account.
 ssh-add
 
 # This will be used to log-in as root from plom account.
-echo 'Asking for root password.'
+echo 'Asking for new root password.'
 ssh root@"${server}" "passwd"
 
 # Set up plom's ~/.ssh/authorized_keys from root's.
 ssh root@"${server}" "passwd"
 
 # Set up plom's ~/.ssh/authorized_keys from root's.