Files
M7350/oe-core/meta-msm/recipes/busybox/files/login.failsafe
T
2024-09-09 08:52:07 +00:00

20 lines
391 B
Bash

#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2008 Koen Kooi
grep '^root:[^!]' /etc/passwd >&- 2>&-
[ "$?" = "0" ] &&
{
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/sh --login