mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
armbian-firstlogin-make-password-warning-messages-consistent (#4457)
This commit is contained in:
4
packages/bsp/common/usr/lib/armbian/armbian-firstlogin
Executable file → Normal file
4
packages/bsp/common/usr/lib/armbian/armbian-firstlogin
Executable file → Normal 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
|
||||
|
||||
Reference in New Issue
Block a user