mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-firstlogin: fix root password handling
Root password was only applied when it was weak. The intention was probably to warn when it was weak, but apply it regardless, so make it so.
This commit is contained in:
@@ -357,8 +357,8 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then
|
||||
okay="$(awk -F': ' '{ print $2}' <<<"$result")"
|
||||
if [[ "$okay" != "OK" ]]; then
|
||||
echo -e "\n\e[0;31mWarning:\x1B[0m Weak password, $okay \b!"
|
||||
(echo "$first_input";echo "$second_input";) | passwd root >/dev/null 2>&1
|
||||
fi
|
||||
(echo "$first_input";echo "$second_input";) | passwd root >/dev/null 2>&1
|
||||
break
|
||||
elif [[ -n $password ]]; then
|
||||
echo -e "Rejected - \e[0;31mpasswords do not match.\x1B[0m Try again [${REPEATS}]."
|
||||
|
||||
Reference in New Issue
Block a user