summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepti Kulkarni <deepti@vyatta.com>2012-09-18 16:52:40 -0700
committerDeepti Kulkarni <deepti@vyatta.com>2012-09-18 16:52:40 -0700
commit4aebc142e0fcc4b858d73d311f96b40c6105f900 (patch)
tree497201c0a5ae40681ede79b4f77ec1e8ff320ee5
parentacaf4a6c2b54e5a9d5f43e4a1688b6ae1d8a0f85 (diff)
downloadvyatta-cfg-system-4aebc142e0fcc4b858d73d311f96b40c6105f900.tar.gz
vyatta-cfg-system-4aebc142e0fcc4b858d73d311f96b40c6105f900.zip
fix for 8372 - Unclear which user ID the changed administrator password applies to
fix for 8350 - Install allows installation with empty password
-rwxr-xr-xscripts/install-system8
-rwxr-xr-xscripts/install/install-functions8
2 files changed, 12 insertions, 4 deletions
diff --git a/scripts/install-system b/scripts/install-system
index 860bdd1e..80e58f6c 100755
--- a/scripts/install-system
+++ b/scripts/install-system
@@ -1096,9 +1096,13 @@ change_password() {
until [[ "$pwd1" == "$pwd2" && "$pwd1" != "vyatta" ]]
do
- read -p "Enter $user password:" -r -s pwd1 <>/dev/tty 2>&0
+ read -p "Enter password for user '$user': " -r -s pwd1 <>/dev/tty 2>&0
echo
- read -p "Retype $user password:" -r -s pwd2 <>/dev/tty 2>&0
+ if [[ "$pwd1" == "" ]]; then
+ echo "'' is not a valid password"
+ continue
+ fi
+ read -p "Retype password for user '$user':" -r -s pwd2 <>/dev/tty 2>&0
echo
if [ "$pwd1" != "$pwd2" ]
diff --git a/scripts/install/install-functions b/scripts/install/install-functions
index 9290d88b..34ced705 100755
--- a/scripts/install/install-functions
+++ b/scripts/install/install-functions
@@ -237,9 +237,13 @@ change_password() {
local pwd2="2"
until [[ "$pwd1" == "$pwd2" && "$pwd1" != "vyatta" ]]; do
- read -p "Enter $user password:" -r -s pwd1 <>/dev/tty 2>&0
+ read -p "Enter password for user '$user':" -r -s pwd1 <>/dev/tty 2>&0
echo
- read -p "Retype $user password:" -r -s pwd2 <>/dev/tty 2>&0
+ if [[ "$pwd1" == "" ]]; then
+ echo "'' is not a valid password"
+ continue
+ fi
+ read -p "Retype password for user '$user':" -r -s pwd2 <>/dev/tty 2>&0
echo
if [ "$pwd1" != "$pwd2" ]; then