Page 1 of 1

Terminal Auto Login by root Without any X?

Posted: 2018/02/07 09:48:52
by mbzadegan
Hi everybody,
How can I auto login by root after every boot? BTW, I have not any X installed.

Re: Terminal Auto Login by root Without any X?

Posted: 2018/02/08 06:06:59
by Whoever
Why do you want to do this?

Re: Terminal Auto Login by root Without any X?

Posted: 2018/02/08 18:16:08
by poky
File /etc/init/start-ttys.override:

Code: Select all

#
# This service starts the configured number of gettys.
#
# Do not edit this file directly. If you want to change the behaviour,
# please create a file start-ttys.override and put your changes there.
#
start on stopped rc RUNLEVEL=[2345]
env ACTIVE_CONSOLES=/dev/tty[1-6]
env E_TTY=/dev/tty1
task
script
    . /etc/sysconfig/init
    for tty in $(echo $ACTIVE_CONSOLES) ; do
        if [ "$tty" = "$E_TTY" ]; then
        initctl start ttyautologin TTY=$tty
        else
        initctl start tty TTY=$tty
fi
done
end script
File /etc/init/ttyautologin.conf:

Code: Select all

# tty - getty
#
# This service maintains a getty on the specified device.

stop on runlevel [S016]
respawn
instance $TTY
exec /sbin/mingetty --delay=10 --autologin root $TTY