diff options
author | Rick Balocca <rbalocca@vyatta.com> | 2008-08-06 15:51:21 -0700 |
---|---|---|
committer | Rick Balocca <rbalocca@vyatta.com> | 2008-08-06 15:51:21 -0700 |
commit | 2a49a4affae63864797a473b14def10824e2bc83 (patch) | |
tree | 48f3c5d89797abdfd25767d4b06af8aa922a0db2 /scripts | |
parent | fe3d0a401c90030ffdbf0b9e6d3db9dc2543c304 (diff) | |
download | vyatta-cfg-system-2a49a4affae63864797a473b14def10824e2bc83.tar.gz vyatta-cfg-system-2a49a4affae63864797a473b14def10824e2bc83.zip |
Merge from islavista
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/standalone_root_pw_reset | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/standalone_root_pw_reset b/scripts/standalone_root_pw_reset index b173f22d..336d534d 100755 --- a/scripts/standalone_root_pw_reset +++ b/scripts/standalone_root_pw_reset @@ -70,13 +70,13 @@ cp $CF ${CF}.before_pwrecovery echo "Reseting the root password..." # change system first -newpwd=$(mkpasswd -H md5 vyatta) +newpwd=`mkpasswd -H md5 vyatta` usermod --password "$newpwd" root # escape / in encrypted passwd pw=$(echo $newpwd | sed 's:/:\\/:g') sed -i \ - -e "/^.* user root {/,/}/s/encrypted-password:.*\$/encrypted-password: \"$pw\"/" \ + -e "/^.* user root {/,/}/s/encrypted-password .*\$/encrypted-password \"$pw\"/" \ $CF echo $(date "+%b%e %T") $(hostname) "Root password reset to factory value" \ |