diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile index f2def7fc0bacee2f398656bad4bb142756b104bf..d70bafca49ed0991d903be3f1b63f75a9282aa1b 100644 --- a/package/base-files/files/etc/profile +++ b/package/base-files/files/etc/profile @@ -29,3 +29,16 @@ alias ll='ls -alF --color=auto' done unset FILE } + +if ( grep -qsE '^root:[!x]?:' /etc/shadow && \ + grep -qsE '^root:[!x]?:' /etc/passwd && \ + [ -z "$FAILSAFE" ] ) +then +cat << EOF +=== WARNING! ===================================== +There is no root password defined on this device! +Use the "passwd" command to set up a new password +in order to prevent unauthorized SSH logins. +-------------------------------------------------- +EOF +fi