LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   startup sequence without login (https://www.linuxquestions.org/questions/linux-general-1/startup-sequence-without-login-885754/)

tilman1 06-11-2011 11:30 AM

startup sequence without login
 
Hello

I have an embedded box on which I am developping a driver using a linux kernel. I frequently need to reboot it and relogin as root.

I wounder whether I can modify the boot sequence so that it directly boots into a bash belonging to user 'root'.

I know that this represents a security issue -- looking at my "use case" this is of concern.

Thanks

Tilman

tilman1 06-11-2011 12:01 PM

What I meant to write:

I know that this represents a security issue -- looking at my "use case" this is of no concern.

phil.d.g 06-12-2011 01:18 AM

Instead of running getty (or whatever other login manager you are using) on tty1 simply run bash.

If you give more details about the distro you are using we'd be able to give you more specific details about how to go about accomplishing that.

tilman1 06-12-2011 03:03 PM

I am using gentoo.

So how do I run bash from inittab and connect it to the tty ?

c1:12345:respawn:/bin/bash ?

Thanks
Tilman

Valery Reznic 06-12-2011 11:12 PM

Quote:

Originally Posted by tilman1 (Post 4383570)
I am using gentoo.

So how do I run bash from inittab and connect it to the tty ?

c1:12345:respawn:/bin/bash ?

Thanks
Tilman

Not tested (OK, tested loooooooooooooong ago)
Code:

c1:12345:respawn:/bin/bash < /dev/tty1 > /dev/tty1 2>&1

phil.d.g 06-12-2011 11:24 PM

Quote:

Originally Posted by tilman1 (Post 4383570)
c1:12345:respawn:/bin/bash

Yep, that should do it. Just tried it on Arch to be sure.

tilman1 06-16-2011 03:24 PM

I just tried on the command line -- it works.

Thanks

Tilman


All times are GMT -5. The time now is 06:13 PM.