diff options
author | James Davidson <james.davidson@vyatta.com> | 2012-09-06 11:06:49 -0700 |
---|---|---|
committer | James Davidson <james.davidson@vyatta.com> | 2012-09-06 11:06:49 -0700 |
commit | 59b1e0fc7b82ce32b8c284b18ccd9ff75c699ac4 (patch) | |
tree | 2c815922aeb00d9500f76d3c1b6a432cf3a9ac63 /scripts/standalone_root_pw_reset | |
parent | c9676bf31161177987561f1f36e71c3983913423 (diff) | |
download | vyatta-cfg-system-59b1e0fc7b82ce32b8c284b18ccd9ff75c699ac4.tar.gz vyatta-cfg-system-59b1e0fc7b82ce32b8c284b18ccd9ff75c699ac4.zip |
Set system password also when resetting admin password
Fixes bug 3241
Diffstat (limited to 'scripts/standalone_root_pw_reset')
-rwxr-xr-x | scripts/standalone_root_pw_reset | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/standalone_root_pw_reset b/scripts/standalone_root_pw_reset index 061db108..e64b125d 100755 --- a/scripts/standalone_root_pw_reset +++ b/scripts/standalone_root_pw_reset @@ -52,9 +52,11 @@ change_password() { fi done + local epwd=$(mkpasswd -H md5 "$pwd1") + usermod -p $epwd $user # escape any slashes in resulting password - local epwd=$(mkpasswd -H md5 "$pwd1" | sed 's:/:\\/:g') - set_encrypted_password $user $epwd $CF + local eepwd=$(sed 's:/:\\/:g' <<< $epwd) + set_encrypted_password $user $eepwd $CF } # System is so messed up that doing anything would be a mistake |