How do I enable autologin on TTY running on the Gadget Mode serial port?

The Cluster HAT allows you to log into the Pi Zeros via the (Gadget USB) Serial port, sometimes it's helpful to skip typing in the password.

To enable auto logins on the TTY running on any serial port on the Pi Zeros log into each Pi Zero run the following command and reboot.

sudo sed -i "s#agetty --noclear#agetty --autologin pi --noclear #" /lib/systemd/system/getty@.service

And to disable it run the following command and reboot.

sudo sed -i "s#agetty --autologin pi --noclear#agetty --noclear #" /lib/systemd/system/getty@.service

To login automatically using a different username replace the "pi" username in the above commands.

When enabling this all users with access to the Controller Pi will be able to log into the Pi Zeros without any authentication.

You can comment on this FAQ