This is a discussion on start program instead of login prompt within the Linux Administration forums, part of the Linux Forums category; Hi all, I have this little problem: for a somewhat embedded linux system I require the system on console tty1 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
I have this little problem: for a somewhat embedded linux system I require the system on console tty1 NOT to display a login prompt, but to start a shell script with a certain user and group ID. Alas my changings in /etc/inittab didn't produce any useful result (terminal tty1 was just unusable after that :-) so I'm asking here. What do I have to do to achieve an autologin on console 1 with a certain user and to execute a program afterwards - automatically? Thanks in advance for any help & greetings, Axel. |
|
|||
|
Axel Bock <axel@romteck.com> wrote:
> Hi all, > > I have this little problem: for a somewhat embedded linux system I > require the system on console tty1 NOT to display a login prompt, but to > start a shell script with a certain user and group ID. You want to use rungetty. Don't just change /etc/inittab to run another program, because there are terminal issues, such as carriage return sequences. You'll find that if you don't use rungetty, you may very well get stair-stepping. -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |
|
|||
|
Axel Bock wrote:
> Hi all, > > I have this little problem: for a somewhat embedded linux system I > require the system on console tty1 NOT to display a login prompt, but to > start a shell script with a certain user and group ID. > > Alas my changings in /etc/inittab didn't produce any useful result > (terminal tty1 was just unusable after that :-) so I'm asking here. > > What do I have to do to achieve an autologin on console 1 with a certain > user and to execute a program afterwards - automatically? > > > Thanks in advance for any help & greetings, > > Axel. You were along the right lines. If you don't want the login prompt, you will need to look at /etc/inittab to do this for you. Basically just remove the gettys - 'man inittab'. If you then want to start a script, have a look at rc. This varies (greatly sometimes) between distributions but you can look for its path in /etc/inittab for a lead. It is then up to the script to then drop privileges (from root). -- Ben M. ---------------- What are Software Patents for? To protect the small enterprise from bigger companies. What do Software Patents do? In its current form, they protect only companies with big legal departments as they: a.) Patent everything no matter how general b.) Sue everybody. Even if the patent can be argued invalid, small companies can ill-afford the typical $500k cost of a law-suit (not to mention years of harassment). Don't let them take away your right to program whatever you like. Make a stand on Software Patents before its too late. Read about the ongoing battle at http://swpat.ffii.org/ ---------------- |