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