How do I enable autologin on TTY running on the Controllers serial port [Raspbian Buster/Bullseye]?

~ 0 min

To enable auto logins on the TTY running on any serial port on the Controller log in and run the following commands and reboot.

sudo mkdir -p /etc/systemd/system/serial-getty@ttyS0.service.d/
sudo bash -c "cat > /etc/systemd/system/serial-getty@ttyS0.service.d/autologin.conf << EOF
ExecStart=-/sbin/agetty --autologin pi --noclear %I \$TERM

And to disable it run the following command and reboot.

sudo rm -rf /etc/systemd/system/serial-getty@ttyS0.service.d/

When enabling this all users with access to the Controller Pi serial port will be able to log in without any authentication.

Average rating 0 (0 Votes)

You cannot comment on this entry