Skip to content

Undoing Root "Auto‐Login"

CanbiZ edited this page May 9, 2025 · 4 revisions

This has been asked several times so I'll list the steps to undo autologin. If you don't set a root password first, you will not be able to login to the container again, ever.

Debian / Ubuntu:

1. set the root password

sudo passwd root

2. Remove Autologin

remove --autologin root from /etc/systemd/system/[email protected]/override.conf

3. Reboot Machine

reboot

Alpine:

1. set the root password

passwd root

2. Remove Autologin

rm -rf /etc/local.d/autologin.start 

3. Reboot Machine

reboot

Clone this wiki locally