This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Auto Log in script

Hi,

 

am using DM6467 Processor in my application, currently now logging by providing the user name as "root".

But now i want make this login to be done automatically. did anyone have tried ?

requets your comment, where i need to amke change in the filesystem.

 

thanks,

balaji

  • Balaji,

    If you don't want any login prompt; it can be done.

    Look into /etc/inittab in the filesystem you are mounting.

    You should see a line like this:

    ::askfirst:-/bin/sh
    Replace askfirst with respawn
    OR
    ::respawn:-/bin/login
    Replace /bin/login with /bin/sh

    But again the contents of inittab in your filesystem could be different. Based on my suggestions above you could find the solution that works best for your needs.

    This link could be of help to you:
    http://linuxembedded.blogspot.com/2006/11/understanding-busybox-inittab.html

    If you are unable to get it working, share the contents of your etc/inittab and options you tried. I might be able to offer some suggestions.

    If you get it working, share your changes. Could be a reference for others.

  • Hi Sanjeev

    I have tried auto login with the steps that you mentioned above on VAYU EVM board but was unable to login automatically. Can you help me to solve this issue?. I am enclosing my  /etc/inittab file.

    Thanks and regards

    Jithin Daggy

    /etc/inittab file : 

    # /etc/inittab: init(8) configuration.

    # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $

    # The default runlevel.
    id:5:initdefault:

    # Boot-time system configuration/initialization script.
    # This is run first except when booting in emergency (-b) mode.
    si::sysinit:/etc/init.d/rcS

    # What to do in single-user mode.
    ~~:S:wait:/sbin/sulogin

    # /etc/init.d executes the S and K scripts upon change
    # of runlevel.
    #
    # Runlevel 0 is halt.
    # Runlevel 1 is single-user.
    # Runlevels 2-5 are multi-user.
    # Runlevel 6 is reboot.

    l0:0:wait:/etc/init.d/rc 0
    l1:1:wait:/etc/init.d/rc 1
    l2:2:wait:/etc/init.d/rc 2
    l3:3:wait:/etc/init.d/rc 3
    l4:4:wait:/etc/init.d/rc 4
    l5:5:wait:/etc/init.d/rc 5
    l6:6:wait:/etc/init.d/rc 6
    # Normally not reached, but fallthrough in case of emergency.
    z6:6:respawn:/sbin/sulogin
    O0:12345:respawn:/sbin/getty 115200 ttyO0
    # /sbin/getty invocations for the runlevels.
    #
    # The "id" field MUST be the same as the last
    # characters of the device (after "tty").
    #
    # Format:
    #  <id>:<runlevels>:<action>:<process>
    #

    1:2345:respawn:/sbin/getty 38400 tty1

  • Hello Jithin,

    You can bypass the login prompt by amending this line
    O0:12345:respawn:/sbin/getty 115200 ttyO0
    to
    O0:12345:respawn:/bin/login -f root ttyO0 </dev/ttyO0 >/dev/ttyO0 2>&1

    Best regards,
    Kemal
  • Hi Kemal

    Thanks a lot.. The suggestion you gave works perfectly.  I was working on this for two days. Now it is solved. Thanks for your valuable help.

    Thanks and Regards

    JIthin Daggy