It is required that when booting the Linux machine (Ubuntu 10), it automatically logs in as root in the console. There is no graphical shell.
Tell us how this is done? On the Internet of information at least and all outdated.
It is required that when booting the Linux machine (Ubuntu 10), it automatically logs in as root in the console. There is no graphical shell.
Tell us how this is done? On the Internet of information at least and all outdated.
This is an answer directly to the question, and the author of the question, judging by the content of the comments, needs a very, very different thing - to find out why he does not run the /etc/rc.local script. but this is a completely different question.
On the Internet of information at least and all outdated.
this is not entirely true. For many years in popular distributions on the first few (usually from the first to the sixth) virtual terminals usually run the same agetty or mingetty programs .
and both have the option --autologin имя-пользователя (some implementations are -a имя-пользователя ), which does exactly what its name implies.
another thing is that it is not always easy to determine exactly where the file is located, which describes the launch of *getty . to add an option to invoking the correct *getty instance.
in the “good old” sysv initialization, this, of course, is the /etc/inittab :
$ grep -v '^#' /etc/inittab | grep getty 1:2345:respawn:/sbin/getty 38400 tty1 2:23:respawn:/sbin/getty 38400 tty2 3:23:respawn:/sbin/getty 38400 tty3 4:23:respawn:/sbin/getty 38400 tty4 5:23:respawn:/sbin/getty 38400 tty5 6:23:respawn:/sbin/getty 38400 tty6 in the upstart initialization system, this role seems to be played by the /etc/init/tty?.conf files:
$ grep -v '^#' /etc/init/tty?.conf | grep getty /etc/init/tty1.conf:exec /sbin/getty -8 38400 tty1 /etc/init/tty2.conf:exec /sbin/getty -8 38400 tty2 /etc/init/tty3.conf:exec /sbin/getty -8 38400 tty3 /etc/init/tty4.conf:exec /sbin/getty -8 38400 tty4 /etc/init/tty5.conf:exec /sbin/getty -8 38400 tty5 /etc/init/tty6.conf:exec /sbin/getty -8 38400 tty6 In systemd, the situation is somewhat more complicated . As far as I understand, looking at the debian configuration, you need to replace the symbolic link /etc/systemd/system/getty.target.wants/getty@tty1.service , which refers to the universal service file /lib/systemd/system/getty@.service , to a real file (with the same name - getty@tty1.service ). You can copy the contents of the same /lib/systemd/system/getty@.service , and add the above option to the *getty program call.
Why replace and not immediately fix the file with the universal service /lib/systemd/system/getty@.service ? so that when switching to other virtual terminals (not tty1 ), the *getty program *getty “as before”, and offers a “normal” invitation to enter a login / password.
Source: https://ru.stackoverflow.com/questions/591993/
All Articles