summaryrefslogtreecommitdiff
path: root/scripts/standalone_root_pw_reset
diff options
context:
space:
mode:
authorAlex Harpin <development@landsofshadow.co.uk>2014-10-16 20:12:34 +0100
committerAlex Harpin <development@landsofshadow.co.uk>2014-10-16 20:12:34 +0100
commit4c72c4877f5226096df4f7c15cb73c5adb93055d (patch)
treeb1331cf613e057c094a9f00ea737f486eacf2908 /scripts/standalone_root_pw_reset
parentb269de577ed4d417be554b5e6f4589231b0d80a6 (diff)
downloadvyatta-cfg-system-4c72c4877f5226096df4f7c15cb73c5adb93055d.tar.gz
vyatta-cfg-system-4c72c4877f5226096df4f7c15cb73c5adb93055d.zip
vyatta-cfg-system: fix for 'user vyos doesn't exist' on password reset
If you delete the vyos user from the system and then go into password reset mode on reboot, the configuration entry for the vyos user is recreated but the command returns 'usermod: user 'vyos' does not exist'. Despite this message the user is created correctly on a full reboot, just not at the point the command is run. Bug #342 http://bugzilla.vyos.net/show_bug.cgi?id=342
Diffstat (limited to 'scripts/standalone_root_pw_reset')
-rwxr-xr-xscripts/standalone_root_pw_reset3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/standalone_root_pw_reset b/scripts/standalone_root_pw_reset
index 910a141d..dc12a4d6 100755
--- a/scripts/standalone_root_pw_reset
+++ b/scripts/standalone_root_pw_reset
@@ -52,8 +52,9 @@ change_password() {
fi
done
+ # set the password for the user then store it in the config
+ # so the user is recreated on the next full system boot.
local epwd=$(mkpasswd -H md5 "$pwd1")
- usermod -p $epwd $user
# escape any slashes in resulting password
local eepwd=$(sed 's:/:\\/:g' <<< $epwd)
set_encrypted_password $user $eepwd $CF