3

Can someone help to autologin in console text mode as root in fedora, usually I can do using script like this :

/sbin/autologin.sh:

#!/bin/bash
0</dev/$1 1>/dev/$1 2>&1
cat /etc/issue
shift
exec $*

and on /etc/inittab do login by calling that script

1:2345:respawn:/sbin/autologin.sh tty1 login -f root
..
..

now I can't do that, since fedora use /etc/init/tty.conf :

stop on runlevel [016]
respawn
instance $TTY
exec /sbin/mingetty $TTY

I know its dangerous to autologin and moreover as root, but I don't care, I don't care about security.

1
  • On most Linux installations, considering the root user "secure" is a bit of a mistake. In fact, if you have physical access to the console, and can reboot it manually, gaining access to a root shell is as easy as adjusting the kernel boot parameters, and many distros provide a "recovery mode" boot option that does it for you. The root account can be considered secure against remote users on a server, but you need an encrypted drive to make it secure against a local user.
    – ams
    Jan 21, 2013 at 13:43

1 Answer 1

5

Add the following line to "/etc/init/tty.conf":

exec /sbin/mingetty --autologin root $TTY

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.