aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/etc/profile13
1 files changed, 13 insertions, 0 deletions
diff --git a/package/base-files/files/etc/profile b/package/base-files/files/etc/profile
index f2def7fc0b..d70bafca49 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