diff options
author | James Davidson <james.davidson@vyatta.com> | 2012-09-21 14:11:49 -0700 |
---|---|---|
committer | James Davidson <james.davidson@vyatta.com> | 2012-09-21 14:11:49 -0700 |
commit | c61e29db49e9e757f593b746723baab36a75ae49 (patch) | |
tree | 21f65c5fb1faa4db1cdb2b6085662f37aedf9a05 | |
parent | 6a0a23444df6e9026392cbaef71fa4c6ad78460c (diff) | |
download | vyatta-cfg-system-c61e29db49e9e757f593b746723baab36a75ae49.tar.gz vyatta-cfg-system-c61e29db49e9e757f593b746723baab36a75ae49.zip |
Do not check disabled accounts for default password
Fixes bug 8368
-rwxr-xr-x | scripts/vyatta-first-login-passwd.sh | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/vyatta-first-login-passwd.sh b/scripts/vyatta-first-login-passwd.sh index d75e5c0c..ab4e8ed4 100755 --- a/scripts/vyatta-first-login-passwd.sh +++ b/scripts/vyatta-first-login-passwd.sh @@ -91,14 +91,17 @@ change_password() { save } +dpwd='"*"' for user in $($API listEffectiveNodes system login user); do user=${user//\'/} epwd=$(show system login user $user authentication encrypted-password) epwd=$(awk '{ print $2 }' <<<$epwd) - salt=$(awk 'BEGIN{ FS="$" }; { print $3 }' <<<$epwd) - vyatta_epwd=$(mkpasswd -H md5 -S $salt vyatta) - if [[ $epwd == $vyatta_epwd ]]; then - change_password $user + if [[ $epwd != $dpwd ]]; then + salt=$(awk 'BEGIN{ FS="$" }; { print $3 }' <<<$epwd) + vyatta_epwd=$(mkpasswd -H md5 -S $salt vyatta) + if [[ $epwd == $vyatta_epwd ]]; then + change_password $user + fi fi done eval $(exit_configure) |