diff options
Diffstat (limited to 'scripts/vyatta-first-login-passwd.sh')
-rwxr-xr-x | scripts/vyatta-first-login-passwd.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/vyatta-first-login-passwd.sh b/scripts/vyatta-first-login-passwd.sh index d75e5c0c..467eff4b 100755 --- a/scripts/vyatta-first-login-passwd.sh +++ b/scripts/vyatta-first-login-passwd.sh @@ -95,7 +95,15 @@ 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) + # check for old unsalted default password string. + if [[ $epwd == '$1$$Ht7gBYnxI1xCdO/JOnodh.' ]]; then + change_password $user + continue + fi salt=$(awk 'BEGIN{ FS="$" }; { print $3 }' <<<$epwd) + if [[ $salt == '' ]];then + continue + fi vyatta_epwd=$(mkpasswd -H md5 -S $salt vyatta) if [[ $epwd == $vyatta_epwd ]]; then change_password $user |