summaryrefslogtreecommitdiff
path: root/scripts/standalone_root_pw_reset
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2008-07-30 11:48:06 -0700
committerBob Gilligan <gilligan@vyatta.com>2008-07-30 11:48:06 -0700
commit0be0294232e56ae15e925f1070054bfd0de88754 (patch)
treeb2f1c24d581c0110696f63e1a13c19f940602e43 /scripts/standalone_root_pw_reset
parent573add99eb1632e43707acd086d7010d08f465d5 (diff)
downloadvyatta-cfg-quagga-0be0294232e56ae15e925f1070054bfd0de88754.tar.gz
vyatta-cfg-quagga-0be0294232e56ae15e925f1070054bfd0de88754.zip
Bugfix: 3519
Fix some typos in standalone_root_pw_reset.
Diffstat (limited to 'scripts/standalone_root_pw_reset')
-rwxr-xr-xscripts/standalone_root_pw_reset4
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" \