X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/3d007394805916ceb2214bfd7e06d8a4899262c5..88d99188b8fdc9b172b74e41db418a9b85b13ae0:/openwrt/package/base-files/default/bin/login?ds=sidebyside diff --git a/openwrt/package/base-files/default/bin/login b/openwrt/package/base-files/default/bin/login index bb065e54a..8f9281726 100755 --- a/openwrt/package/base-files/default/bin/login +++ b/openwrt/package/base-files/default/bin/login @@ -1,20 +1,16 @@ #!/bin/sh -. /etc/sysconf 2>&- - -[ "$FAILSAFE" != "true" ] && -[ "$BR2_SYSCONF_TELNET_FAILSAFE_ONLY" = "y" ] && +grep '^root:[^!]' /etc/passwd >&- 2>&- +[ "$?" = "0" -a -z "$FAILSAFE" ] && { - grep '^root:[^!]' /etc/passwd >&- 2>&- && - { 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