From e067c94bb968ecb01124bbd329fcc30f1b6a133d Mon Sep 17 00:00:00 2001 From: James Davidson Date: Tue, 2 Oct 2012 15:29:57 -0700 Subject: 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. --- scripts/vyatta-first-login-passwd.sh | 7 +++++-- 1 file 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 -- cgit v1.2.3