2005-02-06 00:52:16 +00:00
|
|
|
#!/bin/sh
|
2006-06-27 00:36:13 +00:00
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
|
2006-04-05 02:09:22 +00:00
|
|
|
grep '^root:[^!]' /etc/passwd >&- 2>&-
|
|
|
|
[ "$?" = "0" -a -z "$FAILSAFE" ] &&
|
2005-05-13 13:49:48 +00:00
|
|
|
{
|
|
|
|
echo "Login failed."
|
|
|
|
exit 0
|
2006-04-05 02:09:22 +00:00
|
|
|
} || {
|
2005-05-13 13:49:48 +00:00
|
|
|
cat << EOF
|
|
|
|
=== IMPORTANT ============================
|
|
|
|
Use 'passwd' to set your login password
|
|
|
|
this will disable telnet and enable SSH
|
|
|
|
------------------------------------------
|
|
|
|
EOF
|
|
|
|
}
|
2006-04-05 02:09:22 +00:00
|
|
|
|
2005-03-06 03:34:52 +00:00
|
|
|
exec /bin/ash --login
|