summaryrefslogtreecommitdiffstats
path: root/package/base-files/default/bin/login
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/default/bin/login')
-rwxr-xr-xpackage/base-files/default/bin/login18
1 files changed, 18 insertions, 0 deletions
diff --git a/package/base-files/default/bin/login b/package/base-files/default/bin/login
new file mode 100755
index 0000000000..ff5d3660e4
--- /dev/null
+++ b/package/base-files/default/bin/login
@@ -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