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 to
JW
Loading thread data ...

There is autologin for that. Davide

Reply to
Davide Bianchi

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    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

       "You're one of those condescending Unix computer users!"
 Click to see the full signature
Reply to
Hactar

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/                        .   *   .   .*
 Click to see the full signature
Reply to
Pascal Bourguignon

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

--
-eben    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar
An ASCII character walks into a bar and orders a double. "Having a bad
 Click to see the full signature
Reply to
Hactar

Hi.

Here is a good article on setting up autologins or running apps on a specific terminal

formatting link

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:

formatting link

We all have to start somewhere

Of course you are welcome!

Reply to
wayne

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

--
__Pascal_Bourguignon__                              .  *   * . * .* .
http://www.informatimago.com/                        .   *   .   .*
 Click to see the full signature
Reply to
Pascal Bourguignon

Well if this

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    ebQenW1@EtaRmpTabYayU.rIr.OcoPm    home.tampabay.rr.com/hactar

A: Because it looks dumb and is hard to read.
 Click to see the full signature
Reply to
Hactar

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 to
John-Paul Stewart

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.