armbian-firstlogin-make-password-warning-messages-consistent (#4457)

This commit is contained in:
schwar3kat
2022-11-18 05:43:21 +13:00
committed by GitHub
parent 561682027f
commit 86fce751a5

4
packages/bsp/common/usr/lib/armbian/armbian-firstlogin Executable file → Normal file
View File

@@ -262,7 +262,7 @@ add_user()
result="$(cracklib-check <<<"$password")"
okay="$(awk -F': ' '{ print $2}' <<<"$result")"
if [[ "$okay" != "OK" ]]; then
echo -e "\n\e[0;31mWarning:\x1B[0m Weak password!"
echo -e "\n\e[0;31mWarning:\x1B[0m Weak password, $okay \b!"
fi
echo -e ""
read -e -p "Please provide your real name: " -i "${RealUserName^}" RealName
@@ -348,7 +348,7 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then
result="$(cracklib-check <<<"$password")"
okay="$(awk -F': ' '{ print $2}' <<<"$result")"
if [[ "$okay" != "OK" ]]; then
echo -e "\n\e[0;31mWarning:\x1B[0m $okay!"
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
break