2005-02-06 02:52:16 +02:00
|
|
|
#!/bin/sh
|
2011-11-11 15:25:31 +02:00
|
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
2006-06-27 03:36:13 +03:00
|
|
|
|
2011-11-17 11:40:06 +02:00
|
|
|
if ( ! grep -qs '^root:[!x]\?:' /etc/shadow || \
|
2011-11-14 21:02:01 +02:00
|
|
|
! grep -qs '^root:[!x]\?:' /etc/passwd ) && \
|
|
|
|
[ -z "$FAILSAFE" ]
|
|
|
|
then
|
2010-07-18 21:36:12 +03:00
|
|
|
echo "Login failed."
|
|
|
|
exit 0
|
|
|
|
else
|
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
|
2010-07-18 21:36:12 +03:00
|
|
|
fi
|
2006-04-05 05:09:22 +03:00
|
|
|
|
2005-03-06 05:34:52 +02:00
|
|
|
exec /bin/ash --login
|