diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-10-02 15:27:19 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-02 15:27:19 +0100 |
| commit | 55a95ce60e3f4f32316875dca37ee96b323671f4 (patch) | |
| tree | dc0fba38c68b731c2da029d23dcde4958f4e3a94 | |
| parent | b4d33753c2f414609167cd18c7a5d39a3a7b4b6f (diff) | |
| parent | 44e12a001b21d6e0250466e252d61c805ba004df (diff) | |
| download | vyos-1x-55a95ce60e3f4f32316875dca37ee96b323671f4.tar.gz vyos-1x-55a95ce60e3f4f32316875dca37ee96b323671f4.zip | |
Merge pull request #4739 from roedie/T7852
T7852: Switch to yescrypt password encryption
| -rw-r--r-- | python/vyos/utils/auth.py | 2 | ||||
| -rwxr-xr-x | src/system/standalone_root_pw_reset | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/python/vyos/utils/auth.py b/python/vyos/utils/auth.py index 6e816af71..c6803fae4 100644 --- a/python/vyos/utils/auth.py +++ b/python/vyos/utils/auth.py @@ -90,7 +90,7 @@ def evaluate_strength(passwd: str) -> dict[str, str]: def make_password_hash(password): """ Makes a password hash for /etc/shadow using mkpasswd """ - mkpassword = 'mkpasswd --method=sha-512 --stdin' + mkpassword = 'mkpasswd --method=yescrypt --stdin' return cmd(mkpassword, input=password, timeout=5) def split_ssh_public_key(key_string, defaultname=""): diff --git a/src/system/standalone_root_pw_reset b/src/system/standalone_root_pw_reset index c82cea321..c2eea9411 100755 --- a/src/system/standalone_root_pw_reset +++ b/src/system/standalone_root_pw_reset @@ -54,7 +54,7 @@ change_password() { # 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 --method=sha-512 "$pwd1") + local epwd=$(mkpasswd --method=yescrypt "$pwd1") # escape any slashes in resulting password local eepwd=$(sed 's:/:\\/:g' <<< $epwd) set_encrypted_password $user $eepwd $CF @@ -90,7 +90,7 @@ fi echo -n "Do you wish to reset the admin password? (y or n) " read -t $TIME_TO_WAIT response if [ "$?" != "0" ]; then - echo + echo echo "Response not received in time." echo "The admin password will not be reset." echo "Rebooting in 5 seconds..." @@ -127,7 +127,7 @@ fi # Leftover from V3.0 if grep -q /opt/vyatta/etc/config /etc/fstab -then +then echo "Mounting the config filesystem..." mount /opt/vyatta/etc/config/ fi |
