Find the answer to your Linux question:
Results 1 to 6 of 6
So, I wanted to set my system up to auto login into root. I followed the instructions I found here: Koan | linux embedded software engineering solutions Which specify, Edit ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2009
    Posts
    3

    Autologin into root help


    So, I wanted to set my system up to auto login into root.

    I followed the instructions I found here:
    Koan | linux embedded software engineering solutions

    Which specify,
    Edit /etc/inittab and add --autologin root to all the mingetty lines of the inittab, so your inittab would look something like this:

    1:2345:respawn:/sbin/mingetty --autologin root tty1
    2:2345:respawn:/sbin/mingetty --autologin root tty2
    3:2345:respawn:/sbin/mingetty --autologin root tty3
    4:2345:respawn:/sbin/mingetty --autologin root tty4
    5:2345:respawn:/sbin/mingetty --autologin root tty5
    6:2345:respawn:/sbin/mingetty --autologin root tty6

    Reboot the system and your done.
    The system autologins into the root account.
    So I did this and I get the error on startup:
    Code:
    /sbin/mingetty: unrecognized option '--autologin'
    over and over.

    So, my questions are:
    1) Now I can't return to the prompt; how do I break out of this and return to a prompt, so I can get back in and fix it. This is very important. I should have proceeded more cautiously.
    2) What should I have done to autologin if not what's listed above.

    Thanks tremendously in advance.

  2. #2
    Just Joined!
    Join Date
    Sep 2007
    Location
    Lafayette, IN
    Posts
    83
    The man page for mingetty suggests that you're doing it right, and I can't find anything obvious on Google. My real question is why are you trying to do this? It seems like a really bad idea from a security standpoint.

  3. #3
    Just Joined!
    Join Date
    Feb 2009
    Posts
    3
    I must have a different version of mingetty; the man page on my system doesn't list autologin as a switch.

    I managed to use grub to run in single user mode and fix things so at least I could start up normally again.

    As far as why I'm doing this, normally this would obviously be a poor security choice, but the device running Linux is actually a scientific instrument for an aircraft running on a private network. It normally will be started without a monitor or keyboard, and just be controlled over the network.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Posts
    3,043
    Quote Originally Posted by arrowoftime View Post
    As far as why I'm doing this, normally this would obviously be a poor security choice, but the device running Linux is actually a scientific instrument for an aircraft running on a private network. It normally will be started without a monitor or keyboard, and just be controlled over the network.
    You are still exposing the whole system to any problems, incorrect format commands etc. You can do just as much damage accidentally as can be done by others intentionally. Could you achieve the results you need with normal user login and setup sudo for passwordless command execution for things that really need it?

  6. #5
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Quote Originally Posted by arrowoftime View Post
    I must have a different version of mingetty; the man page on my system doesn't list autologin as a switch.

    I managed to use grub to run in single user mode and fix things so at least I could start up normally again.

    As far as why I'm doing this, normally this would obviously be a poor security choice, but the device running Linux is actually a scientific instrument for an aircraft running on a private network. It normally will be started without a monitor or keyboard, and just be controlled over the network.
    If it is running an application that you believe should be run as root there are two important questions to ask
    • Why does it need to login? It sounds like you have an application running - if it is non-interactive it would be better to run it as a service/init script
    • Does it really need root privilege? Is it simply a case of granting access to a device?


    It's a common misconception that running as root is simply a security concern. This is not the case - root on a Unix system runs at a much higher priority/access level than Administrator on Windows. An application running as root has the power to take an entire system down. For instance, a memory leak could choke the system. A bad path/file reference could destroy a running system (and it may not be noticed until a reboot). I have yet to come across an application outside of system configuration that could not run as a normal user with a few extra specific privileges granted.

  7. #6
    Just Joined!
    Join Date
    Feb 2009
    Posts
    3
    Sure, it doesn't need to autologin into root necessarily; it just needs to boot and run its startup code when the user presses the on button.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •