[SOLVED] Serial Port RS-232 - Securing console and preventing lockout

Looks to me that you can control it through UCI by setting ttylogin to 1, though I haven't confirmed:
/etc/inittab

::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
::askconsole:/usr/libexec/login.sh

/usr/libexec/login.sh

#!/bin/sh

[ "$(uci -q get system.@system[0].ttylogin)" == 1 ] || exec /bin/ash --login

exec /bin/login

Edit: I don't know that I'd want busybox to be "suid" even on a locked-down box. You might want to look at disabling the console entirely when not in failsafe mode. /bin/false might be your ticket to that.

2 Likes