d196b1fc2e
This enables passworldless login for root via SSH whenever no root password is set (e.g. after reset, flashing without keeping config or in failsafe) and removes telnet support alltogether. Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46809
19 lines
383 B
Bash
Executable File
19 lines
383 B
Bash
Executable File
#!/bin/sh
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
if ( ! grep -qsE '^root:[!x]?:' /etc/shadow || \
|
|
! grep -qsE '^root:[!x]?:' /etc/passwd ) && \
|
|
[ -z "$FAILSAFE" ]
|
|
then
|
|
echo "Login failed."
|
|
exit 0
|
|
else
|
|
cat << EOF
|
|
=== IMPORTANT ============================
|
|
Use 'passwd' to set your login password!
|
|
------------------------------------------
|
|
EOF
|
|
fi
|
|
|
|
exec /bin/ash --login
|