Professional Web Applications Themes

bypass login in && automatically run a specified script - Linux Setup, Configuration & Administration

Hi, I have an embedded system (power pc) that's running linux v 2.4.18 (I'm sorry, I do not know the exact distribution type). There are no graphics support; so it is not running X windows. /etc/inittab show that it's running at runlevel 3 (mult-user). I specifiy a script to run during bootup (specified it in the "rc.local" file). How do I autologin (that is, bypass the login/password prompts)? I know how to do it on redhat KDE, but not on this linux. I tried changing it runlevel 1, but then it bypasses that script that I wanted to run automatically ...

  1. #1

    Default bypass login in && automatically run a specified script

    Hi,

    I have an embedded system (power pc)
    that's running linux v 2.4.18 (I'm sorry,
    I do not know the exact distribution type).
    There are no graphics support; so it
    is not running X windows.

    /etc/inittab show that it's running at
    runlevel 3 (mult-user).

    I specifiy a script to run
    during bootup (specified it
    in the "rc.local" file).

    How do I autologin (that is,
    bypass the login/password
    prompts)? I know how to
    do it on redhat KDE, but not
    on this linux.

    I tried changing it runlevel 1, but
    then it bypasses that script that I
    wanted to run automatically
    during the bootup process.

    Can someone shed some light
    on how to bypass the login
    prompt as well as run whatever
    script that I want automatically?

    Excuse my minimal knowledge of linux.
    Thanks in advance for you help.
    JW Guest

  2. #2

    Default Re: bypass login in && automatically run a specified script

    In comp.os.linux.setup JW <com> wrote: 

    There is autologin for that.
    Davide
    Davide Guest

  3. #3

    Default Re: bypass login in && automatically run a specified script

    In article <google.com>,
    JW <com> wrote: 
     

    Well, init runs some gettys (on my system), as specified in /etc/inittab. I
    guess you could run a script that does something like

    chown username.usergroup /dev/ttyx
    su - username < /dev/ttyx > /dev/ttyx

    and not run the gettys.

    --
    -eben rIr.OcoPm home.tampabay.rr.com/hactar

    "You're one of those condescending Unix computer users!"
    "Here's a nickel, kid. Get yourself a better computer" - Dilbert.
    Hactar Guest

  4. #4

    Default Re: bypass login in && automatically run a specified script

    ARE-ARE.com.unmunge (Hactar) writes:
     

    >
    > Well, init runs some gettys (on my system), as specified in /etc/inittab. I
    > guess you could run a script that does something like
    >
    > chown username.usergroup /dev/ttyx
    > su - username < /dev/ttyx > /dev/ttyx
    >
    > and not run the gettys.[/ref]

    Oh come on, you can surely find something more complicated!


    Otherwise, man inittab
    and replace one of the getty lines:
    1:2345:respawn:/sbin/mingetty --noclear tty1
    by:
    1:2345:respawn:/usr/local/bin/my_script


    --
    __Pascal_Bourguignon__ . * * . * .* .
    http://www.informatimago.com/ . * . .*
    * . . /\ () . *
    Living free in Alaska or in Siberia, a . . / .\ . * .
    grizzli's life expectancy is 35 years, .*. / * \ . .
    but no more than 8 years in captivity. . /* o \ .
    http://www.theadvocates.org/ * '''||''' .
    SCO Spam-magnet: com ******************
    Pascal Guest

  5. #5

    Default Re: bypass login in && automatically run a specified script

    In article <informatimago.com>,
    Pascal Bourguignon <informatimago.com> wrote: 
    > > 
    > >
    > > Well, init runs some gettys (on my system), as specified in /etc/inittab. I
    > > guess you could run a script that does something like
    > >
    > > chown username.usergroup /dev/ttyx
    > > su - username < /dev/ttyx > /dev/ttyx
    > >
    > > and not run the gettys.[/ref]
    >
    > Otherwise, man inittab
    > and replace one of the getty lines:
    > 1:2345:respawn:/sbin/mingetty --noclear tty1
    > by:
    > 1:2345:respawn:/usr/local/bin/my_script[/ref]

    What will chown the tty? And besides, he wants to get a shell too, I think.

    --
    -eben rIr.OcoPm home.tampabay.rr.com/hactar
    An ASCII character walks into a bar and orders a double. "Having a bad
    day?" asks the barman. "Yeah, I have a parity error," replies the ASCII
    chrctr. The barman says, "Yeah, I thght you looked a bit off." -- Skud
    Hactar Guest

  6. #6

    Default Re: bypass login in && automatically run a specified script

    com (JW) wrote in message news:<google.com>... 

    Hi.
     

    Here is a good article on setting up autologins or running apps on a
    specific terminal
    http://www.linuxgazette.com/issue69/henderson.html
     

    Because this tells the kernel not to run /sbin/init but run /bin/bash
    instead, so rc.x scripts are not processed (nor is /etc/inittab)
     

    See the above link or for more examples on starting other applications
    or listing logs on virtual terminals instead of getty:

    http://www.luv.asn.au/overheads/virtualconsoles.html

     

    We all have to start somewhere
     

    Of course you are welcome!
    wayne Guest

  7. #7

    Default Re: bypass login in && automatically run a specified script

    ARE-ARE.com.unmunge (Hactar) writes:
     [/ref]
    >
    > What will chown the tty? And besides, he wants to get a shell too, I think.[/ref]

    Where chowning the tty was asked? I see no wants for a shell neither.


    --
    __Pascal_Bourguignon__ . * * . * .* .
    http://www.informatimago.com/ . * . .*
    * . . /\ () . *
    Living free in Alaska or in Siberia, a . . / .\ . * .
    grizzli's life expectancy is 35 years, .*. / * \ . .
    but no more than 8 years in captivity. . /* o \ .
    http://www.theadvocates.org/ * '''||''' .
    SCO Spam-magnet: com ******************
    Pascal Guest

  8. #8

    Default Re: bypass login in && automatically run a specified script

    In article <informatimago.com>,
    Pascal Bourguignon <informatimago.com> wrote: 
    >
    > Where chowning the tty was asked? I see no wants for a shell neither.[/ref]

    Well if this
     [/ref][/ref]

    isn't a shell, then yes, your way is simpler. And if exec'ing a shell is
    desired, then it'll act funny unless it has the correct ownership. Of
    course, since it's the same user on the tty every time, the chowning could
    be done ahead of time.

    --
    -eben rIr.OcoPm home.tampabay.rr.com/hactar

    A: Because it looks dumb and is hard to read.
    Q: Why is top-posting wrong? -- from com
    Hactar Guest

  9. #9

    Default Re: bypass login in && automatically run a specified script

    wayne wrote: 
    >
    > Because this tells the kernel not to run /sbin/init but run /bin/bash
    > instead, so rc.x scripts are not processed (nor is /etc/inittab)[/ref]

    Uhh.../sbin/init is still run in runlevel 1. Different things are
    started (or not started) in that runlevel, but init most certainly
    runs. Check /etc/rc1.d (or /etc/init.d/rc1.d, depending on distro) and
    /etc/inittab to see what exactly is run in level 1. If you want to
    bypass that, too, you need to boot with the "init=/bin/sh" parameter (or
    similar) to your bootloader.
    John-Paul Guest

Similar Threads

  1. Execute PHP script automatically
    By TJ in forum PHP Development
    Replies: 4
    Last Post: December 14th, 01:43 PM
  2. how to run a script automatically?
    By Yang Li Ke in forum PHP Development
    Replies: 16
    Last Post: September 12th, 08:21 AM
  3. Bypass Startup Script
    By Scott Davis in forum FileMaker
    Replies: 4
    Last Post: June 27th, 03:38 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139