summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog13
-rwxr-xr-xscripts/standalone_root_pw_reset22
2 files changed, 33 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 0a5288be..e4e12584 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+vyatta-cfg-system (0.15.73) unstable; urgency=low
+
+ [ Bob Gilligan ]
+ * Bugfix 4916, 4917: Exit correctly when vyatta user doesn't exist.
+ Add timeout.
+
+ [ Stephen Hemminger ]
+ * Enforce syntax checking on password
+
+ [ Bob Gilligan ]
+
+ -- Bob Gilligan <gilligan@vyatta.com> Fri, 04 Sep 2009 02:56:14 -0700
+
vyatta-cfg-system (0.15.72) unstable; urgency=low
* Revert "Validate encrypted password field"
diff --git a/scripts/standalone_root_pw_reset b/scripts/standalone_root_pw_reset
index b75d19df..b9a28c4b 100755
--- a/scripts/standalone_root_pw_reset
+++ b/scripts/standalone_root_pw_reset
@@ -30,6 +30,10 @@ set_encrypted_password() {
-e "/ user $1 {/,/}/s/encrypted-password .*\$/encrypted-password \"$2\"/" $3
}
+
+# How long to wait for user to respond, in seconds
+TIME_TO_WAIT=30
+
change_password() {
local user=$1
local pwd1="1"
@@ -68,7 +72,18 @@ fi
# user.
#
echo "Do you wish to reset the admin password?"
-read response
+
+read -t $TIME_TO_WAIT response
+if [ "$?" != "0" ]; then
+ echo
+ echo "Response not received in time."
+ echo "The admin password will not be reset."
+ echo "Rebooting in 5 seconds..."
+ sleep 5
+ echo
+ /sbin/reboot -f
+fi
+
response=${response:0:1}
if [ "$response" != "y" -a "$response" != "Y" ]; then
echo "OK, the admin password will not be reset."
@@ -93,7 +108,10 @@ fi
if ! grep -q " user $ADMIN " $CF
then
echo "Administrator account $ADMIN missing..."
- exit 1
+ echo -n "Rebooting in 5 seconds..."
+ sleep 5
+ echo
+ /sbin/reboot -f
fi
echo "Saving backup copy of config.boot..."