You are not logged in.
I use this getty systemd service to autologin into an account
[root@xxxx xxxxx]# cd /etc/systemd/system/getty@tty1.service.d/
[root@xxxx getty@tty1.service.d]# ls override.conf
[root@xxxx getty@tty1.service.d]# cat override.conf
[Service]
ExecStart=
ExecStart=-/usr/bin/agetty --autologin xxxxx --noclear %I $TERM
How to create another GRUB boot entry that would disable this autologin? Maybe run a simple script that would comment out these lines or something. But I have no idea how to do that. I tried installing openrc into Arch Linux but that seemed like too big of a hassle. I tried init=/bin/bash, but that didn't work, it didn't even initialize my keyboard, so I couldn't type... What's the best way to achieve this?
Last edited by spikeyamk (2021-12-20 11:25:30)
Offline
You can mask a unit file from the kernel command line:
systemd.mask=getyy@tty1.serviceBut that would stop TTY1 from ever starting and so leave you at a blank screen after booting. The other (a)gettys would still work as normal though.
Jin, Jîyan, Azadî
Offline
https://www.freedesktop.org/software/sy … mmandLine=
And pass eg. "autologin" or "noautologin" and test the condition accordingly?
Edit: and have a complementary service in getty.target.wants, name one getty_auto@tty1.service or so
Last edited by seth (2021-12-20 12:18:40)
Online