You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1009 B
46 lines
1009 B
17 years ago
|
#!/bin/sh
|
||
|
# Copyright (C) 2008 OpenWrt.org
|
||
|
|
||
17 years ago
|
bl_option=/sbin/bl-option
|
||
17 years ago
|
|
||
17 years ago
|
if [ ! -f $bl_option ] ||
|
||
|
[ ! `$bl_option --get-telnet-enabled` ] ||
|
||
|
[ `$bl_option --get-telnet-enabled` = "0" ]; then
|
||
17 years ago
|
echo \
|
||
|
"
|
||
|
=== IMPORTANT ==========================
|
||
|
Telnet login is disabled for security
|
||
|
reasons. Enabling telnet login on the
|
||
|
host will allow any user connected to
|
||
|
the same network to login to the host.
|
||
|
|
||
|
You can enable telnet login with the
|
||
|
following command in the host console:
|
||
|
|
||
17 years ago
|
# $bl_option -T 1
|
||
17 years ago
|
|
||
|
You can disable telnet login with the
|
||
|
following command in the host console:
|
||
|
|
||
17 years ago
|
# $bl_option -T 0
|
||
17 years ago
|
----------------------------------------
|
||
|
"
|
||
|
exit 0
|
||
|
fi
|
||
|
|
||
|
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
|