From 2a49a4affae63864797a473b14def10824e2bc83 Mon Sep 17 00:00:00 2001 From: Rick Balocca Date: Wed, 6 Aug 2008 15:51:21 -0700 Subject: Merge from islavista --- debian/vyatta-cfg-system.postinst.in | 16 +++++++++------- scripts/standalone_root_pw_reset | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index b21437a5..0dd6248f 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -23,6 +23,7 @@ esac ln -sf ../vyatta-net.rules /etc/udev/rules.d/$vyatta_net_rules if [ "$sysconfdir" != "/etc" ]; then + touch /etc/sudoers cp -p /etc/sudoers /etc/sudoers.bak # for "admin" level @@ -32,13 +33,12 @@ if [ "$sysconfdir" != "/etc" ]; then fi # cleanup any old entries from previous versions - ed - /etc/sudoers <>/etc/sudoers ### BEGIN VYATTA @@ -85,6 +85,8 @@ if [ ! -f /etc/bash_completion ]; then echo "source /etc/bash_completion.d/20vyatta-cfg" >> /etc/bash_completion fi +sed -i 's/^set /builtin set /' /etc/bash_completion + # Local Variables: # mode: shell-script # sh-indentation: 4 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" \ -- cgit v1.2.3