aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/bin/login.sh
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/bin/login.sh')
-rwxr-xr-xpackage/base-files/files/bin/login.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/package/base-files/files/bin/login.sh b/package/base-files/files/bin/login.sh
new file mode 100755
index 0000000000..ff5d3660e4
--- /dev/null
+++ b/package/base-files/files/bin/login.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Copyright (C) 2006 OpenWrt.org
+
+grep '^root:[^!]' /etc/passwd >&- 2>&-
+[ "$?" = "0" -a -z "$FAILSAFE" ] &&
+{
+ echo "Login failed."
+ exit 0
+} || {
+cat << EOF
+ === IMPORTANT ============================
+ Use 'passwd' to set your login password
+ this will disable telnet and enable SSH
+ ------------------------------------------
+EOF
+}
+
+exec /bin/ash --login