Autologin on a serial console

For physical consoles, /bin/login is called instead of /sbin/getty.

1:2345:respawn:/bin/login -f root </dev/tty1 >/dev/tty1 2>&1

This does not work for serial consoles, because you cannot set the baud rate.

I've found a couple of ways to solve this problem.

Autologin wrapper script

Create an autlogin wrapper script that calls /bin/login.

/usr/local/bin/autologin:

#!/bin/sh
exec /bin/login -f root

T0:23:respawn:/sbin/getty -l /usr/local/bin/autologin -n -L ttyS0 115200 vt102

sulogin

If the root account is locked, sulogin can be used to automatically login the root account.

T0:23:respawn:/sbin/getty -l /sbin/sulogin -n -L ttyS0 115200 vt102