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.

Login request on linux console



Hi all,

I am using a DVEVM board with the DM355 processor.

I would like to know how I can disable the login request in the serial console, and start directly with the prompt : "root@ipaddress:~#"

Is it possible? I guess yes.

In contrary, I would like to enable login request when someone wants to use a telnet connection.

Regards,

 

Stéphane.

 

  • Stéphane said:

    I would like to know how I can disable the login request in the serial console, and start directly with the prompt : "root@ipaddress:~#"

    Hello!

    For custom build BusyBox I have used this:

    $ cat busybox/etc/inittab

    ::sysinit:/etc/init.d/rcS
    ::respawn:-/bin/sh
    ::restart:/sbin/init
    ::ctrlaltdel:/bin/umount -a -r

  • Thank you for your answer.

    I've tried to add this line (sh0:3:respawn:/bin/sh) in the inittab file. Your exact syntax didn't work.

    I have the prompt : sh-2.05b#  when I press enter key, but the login prompt comes back again when I try any command (ps.... ls....)

    Maybe your busybox custom build make a difference?

     

    PS: I don't have busybox source code with my LSP from MontaVista, only library. But I will be glad if I could update busybox version to 1.13 instead of my deprecated 1.01!!

  • Please check your syntax. In my example respawn:-/bin/sh and see man inittab and man getty.

    man getty
    .....................................
    -l login_program
                  Invoke  the specified login_program instead of /bin/login.  This
                  allows the use of a non-standard login program (for example, one
                  that  asks for a dial-up password or that uses a different pass‐
                  word file).
     -n     Do  not  prompt  the  user for a login name. This can be used in
                  connection with -l option to invoke a non-standard login process
                  such  as a BBS system. Note that with the -n option, agetty gets
                  no input from user who logs in and therefore won’t  be  able  to
                  figure out parity, character size, and newline processing of the
                  connection. It defaults to space parity, 7 bit  characters,  and
                  ASCII  CR  (13)  end-of-line character.  Beware that the program
                  that agetty starts (usually /bin/login) is run as root.
    .....................................

    May be this http://www.debianadmin.com/how-to-auto-login-and-startx-without-a-display-manager-in-debian.html solve your problem.

     

  • Thanks to your link, Kirill, I have solved my problem for the login request in the console.

    I have added this line in the inittab file:

    1:2345:respawn:/bin/login -f root console

    I suppose that "console" means ttyS0, as it's defined in the "bootargs" environment variable.

    Now root user is logged in automatically at start up.

    Thank you so much for your help.

     

    Now I'm looking for the reverse operation for a telnet connection. I would like to add a login request.

  • Attempted same approach as Stéphane posted.

    If I run # /bin/login -f root console under linux, it asks for password, but the correct password doesn't work. After failure, regular login shows up. I can get in again.

    Boot from the modified inittab file, regular login still shows up, and doesn't take input from UART for the login (at least don't see anything echo back). After login time out, prompts for password, but again correct password doesn't work. Dead loop, I got have to reflash the NAND.

    Side Question: anyway to break this kind of dead loop caused by inittab ?

     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|

    Arago Project http://arago-project.org da850-omapl138-evm ttyS2

    Arago 2009.11 da850-omapl138-evm ttyS2

    da850-omapl138-evm login:
                              Login timed out after 60 seconds.
                                                               Password: root
    Password:
    Login incorrect

                   da850-omapl138-evm login:

  • Hello legendbb ,

    did you get the solution for password error ?
    I also getting the same after by passing login it asks for password ?
    please let me know if you found any solution for this..