summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Davidson <james.davidson@vyatta.com>2012-10-02 15:29:57 -0700
committerJames Davidson <james.davidson@vyatta.com>2012-10-02 15:32:26 -0700
commite067c94bb968ecb01124bbd329fcc30f1b6a133d (patch)
treeeae4cd4f2e537d8772380c077dc2d7fa70bfe611
parentb961515fe736fb87f67f2a3800e1abd8f0ea77a6 (diff)
downloadvyatta-cfg-system-e067c94bb968ecb01124bbd329fcc30f1b6a133d.tar.gz
vyatta-cfg-system-e067c94bb968ecb01124bbd329fcc30f1b6a133d.zip
Commit and save password changes only once
If there are multiple user passwords that need to be changed committing and saving a new password for each user slows the process down alot. Fixes bug 8406.
-rwxr-xr-xscripts/vyatta-first-login-passwd.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/vyatta-first-login-passwd.sh b/scripts/vyatta-first-login-passwd.sh
index bb37fcc8..11d4b85e 100755
--- a/scripts/vyatta-first-login-passwd.sh
+++ b/scripts/vyatta-first-login-passwd.sh
@@ -87,8 +87,6 @@ change_password() {
# escape any slashes in resulting password
local epwd=$(mkpasswd -H md5 "$pwd1" | sed 's:/:\\/:g')
set system login user $user authentication plaintext-password "$pwd1"
- commit
- save
}
dpwd='"*"'
@@ -112,5 +110,10 @@ for user in $($API listEffectiveNodes system login user); do
fi
fi
done
+
+if $API sessionChanged; then
+ commit
+ save
+fi
eval $(exit_configure)
sudo touch /opt/vyatta/etc/.nofirstpasswd