diff options
author | James Davidson <james.davidson@vyatta.com> | 2012-10-02 15:29:57 -0700 |
---|---|---|
committer | James Davidson <james.davidson@vyatta.com> | 2012-10-02 15:32:26 -0700 |
commit | e067c94bb968ecb01124bbd329fcc30f1b6a133d (patch) | |
tree | eae4cd4f2e537d8772380c077dc2d7fa70bfe611 | |
parent | b961515fe736fb87f67f2a3800e1abd8f0ea77a6 (diff) | |
download | vyatta-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-x | scripts/vyatta-first-login-passwd.sh | 7 |
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 |