summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMohit Mehta <mohit.mehta@vyatta.com>2008-07-25 14:57:08 +0000
committerMohit Mehta <mohit.mehta@vyatta.com>2008-07-25 14:57:08 +0000
commitc4035aa5d0601eaa2a64d67ca70326f4de3873e8 (patch)
treedfd5e96ba143d2d4bf1b8464c16bafa7c353fa91 /scripts
parent062638fb818c5632581f25f503684335b094be04 (diff)
parent189dd8d9a5a467aea193aa5ce9e35c0ca14f7b91 (diff)
downloadvyatta-cfg-system-c4035aa5d0601eaa2a64d67ca70326f4de3873e8.tar.gz
vyatta-cfg-system-c4035aa5d0601eaa2a64d67ca70326f4de3873e8.zip
Merge branch 'islavista' of mohit@git.vyatta.com:/git/vyatta-cfg-system into islavista
Diffstat (limited to 'scripts')
-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" \