Root/package/base-files/files/bin/login.sh

1#!/bin/sh
2# Copyright (C) 2006-2011 OpenWrt.org
3
4if ( ! grep -qs '^root:[!x]\?:' /etc/shadow || \
5     ! grep -qs '^root:[!x]\?:' /etc/passwd ) && \
6   [ -z "$FAILSAFE" ]
7then
8    echo "Login failed."
9    exit 0
10else
11cat << EOF
12 === IMPORTANT ============================
13  Use 'passwd' to set your login password
14  this will disable telnet and enable SSH
15 ------------------------------------------
16EOF
17fi
18
19exec /bin/ash --login
20

Archive Download this file



interactive