Trying to auto login on a Debian 11 machine that has no gui.
I had install Debian 11 on a special slice, without any graphics.
I would like to get it logged in automatically as root, then launch a shell script (.sh).
As far as i understand, most setting files uses to be at /etc/somefile.conf, is it enought to just locate the correct one and edit it with Nano?
Sort by:
Best
Open comment sort options
Comments Section
Automating a root login probably isn't the best idea I've heard this week - there are a couple of ways to run a script as root without having root log on to the machine. This is easily done with the system crontab or a systemd unit that runs on boot.
If you really need a root login this is done with a systemd override. See https://wiki.archlinux.org/title/getty#Automatic_login_to_virtual_console
Hope this helps -
Thanks, i'm going to try it.
maybe you need:
rungetty - minimal console getty that can run any process
apt-cache search autologin found this one, there may be others as well
https://superuser.com/questions/969923/automatic-root-login-in-debian-8-0-console-only
Look at the first solution, it should also work for Debian 11
What do you mean by 'has no gui'? are you trying to autologin to a tty? or you mean that there's no display manager (gdm, sddm, lightdm...) and you are trying to login to a desktop environment (kde, xfce, gnome...) ?
Because the ways to achieve this will vary based on your situation.