summaryrefslogtreecommitdiff
path: root/scripts/standalone_root_pw_reset
diff options
context:
space:
mode:
authorRick Balocca <rbalocca@vyatta.com>2008-08-06 15:13:04 -0700
committerRick Balocca <rbalocca@vyatta.com>2008-08-06 15:13:04 -0700
commitbd9e80da61ecf93bc2e4a7ec649d95cfef89d4e2 (patch)
treef30552e4c6b0b584f6c2ff81cd38ae539d5612c7 /scripts/standalone_root_pw_reset
parentad73790f163764d737829838e8708a9a9c240151 (diff)
parentb07c0515451f5f429ef10ee2cfc4472ca452a9a9 (diff)
downloadvyatta-cfg-quagga-bd9e80da61ecf93bc2e4a7ec649d95cfef89d4e2.tar.gz
vyatta-cfg-quagga-bd9e80da61ecf93bc2e4a7ec649d95cfef89d4e2.zip
Merge branch 'islavista' of git:/git/vyatta-cfg-system into islavista
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" \