X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=buster%2Fsetup_scripts%2Finit_user_and_keybased_login.sh;h=298bafacd89f0eea2f2952156c1606ef231cb688;hb=5ae82c06a14cb1342d5dc7617907223a1bb1fb75;hp=73379c417efd5d8b6c94cb5c3b329e9c508e5d24;hpb=6ed86b2a6d6370ebea7fec698716e02198edd1c1;p=config
diff --git a/buster/setup_scripts/init_user_and_keybased_login.sh b/buster/setup_scripts/init_user_and_keybased_login.sh
index 73379c4..298bafa 100755
--- a/buster/setup_scripts/init_user_and_keybased_login.sh
+++ b/buster/setup_scripts/init_user_and_keybased_login.sh
@@ -27,12 +27,16 @@ server="$1"
# 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}"
+# 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