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

~ 0 min
2016-10-14

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/[email protected]

And to disable it run the following command and reboot.

sudo sed -i "s#agetty --autologin pi --noclear#agetty --noclear #" /lib/systemd/system/[email protected]

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.

Average rating 5 (1 Vote)

You can comment this FAQ