Bluehost.com Web Hosting $6.95

bypass login in && automatically run a specified script

This is a discussion on bypass login in && automatically run a specified script within the Linux General forums, part of the Linux Forums category; Hi, I have an embedded system (power pc) that's running linux v 2.4.18 (I'm sorry, I ...


Go Back   Usenet Forums > Linux Forums > Linux General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-07-2003
JW
 
Posts: n/a
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.
Reply With Quote
  #2 (permalink)  
Old 12-07-2003
Davide Bianchi
 
Posts: n/a
Default Re: bypass login in && automatically run a specified script

In comp.os.linux.setup JW <jkpangtang@yahoo.com> wrote:
> How do I autologin (that is,


There is autologin for that.
Davide
Reply With Quote
  #3 (permalink)  
Old 12-08-2003
Pascal Bourguignon
 
Posts: n/a
Default Re: bypass login in && automatically run a specified script

ebenONE@tampabay.ARE-ARE.com.unmunge (Hactar) writes:

> In article <3607e8e4.0312071137.1ff7f160@posting.google.com >,
> JW <jkpangtang@yahoo.com> wrote:
> > How do I autologin (that is,
> > bypass the login/password
> > prompts)?

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

>
> 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.


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: postmaster@sco.com ******************
Reply With Quote
  #4 (permalink)  
Old 12-08-2003
wayne
 
Posts: n/a
Default Re: bypass login in && automatically run a specified script

jkpangtang@yahoo.com (JW) wrote in message news:<3607e8e4.0312071137.1ff7f160@posting.google. com>...
> Hi,


Hi.

> 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.


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

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


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)

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


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


> Excuse my minimal knowledge of linux.


We all have to start somewhere

> Thanks in advance for you help.


Of course you are welcome!
Reply With Quote
  #5 (permalink)  
Old 12-08-2003
Pascal Bourguignon
 
Posts: n/a
Default Re: bypass login in && automatically run a specified script

ebenONE@tampabay.ARE-ARE.com.unmunge (Hactar) writes:

> In article <87n0a4575i.fsf@thalassa.informatimago.com>,
> Pascal Bourguignon <spam@thalassa.informatimago.com> wrote:
> > ebenONE@tampabay.ARE-ARE.com.unmunge (Hactar) writes:
> >
> > > In article <3607e8e4.0312071137.1ff7f160@posting.google.com >,
> > > JW <jkpangtang@yahoo.com> wrote:
> > > > How do I autologin (that is,
> > > > bypass the login/password
> > > > prompts)?
> > >
> > > > Can someone shed some light
> > > > on how to bypass the login
> > > > prompt as well as run whatever
> > > > script that I want automatically?

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


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: postmaster@sco.com ******************
Reply With Quote
  #6 (permalink)  
Old 12-08-2003
John-Paul Stewart
 
Posts: n/a
Default Re: bypass login in && automatically run a specified script

wayne wrote:
>
> jkpangtang@yahoo.com (JW) wrote in message news:<3607e8e4.0312071137.1ff7f160@posting.google. com>...
> >
> > I tried changing it runlevel 1, but
> > then it bypasses that script that I
> > wanted to run automatically
> > during the bootup process.

>
> 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)


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.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 05:59 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0