Is there something that I can type or a set of shortcut keys I can press to produce a shell the login prompt when I first boot up my Linux distro?
Is there something that I can type or a set of shortcut keys I can press to produce a shell the login prompt when I first boot up my Linux distro?
Hmm...not sure what distro you're running, and whether you want to actually only boot up into a console, or if you want to leave X running. If you only want to use Linux from the command line, change the default run level in /etc/inittab (assuming you're still on a SysV init based system) to something like:
That starts up your system in run level 3, which is full multi-user mode without X.Code:id:3:initdefault:
If you want to leave X running, but get to a text-based login prompt, I think you can use Ctrl+Alt+1 through Ctrl+Alt+6, and have 6 different simultaneous console sessions. I think Ctrl+Alt+7 gets you back to X.
I could be way off on the key combinations though. It's been a while since I've messed with any of that, I just use run level 3 and do everything via putty sessions from my windows box.
No you misunderstood me. Let's say my computer is off and I boot my it up. It goes thru the whole process and comes to a stop at the password login screen. It will display your name and have a blank password box. At this point I'm looking to get a shell, not a whole x11 window, just plain terminal. Preferably root. I want to feed the system commands like Linux 1 or init=/bin/bash rw or echo "ankit::0:0:::" >> /etc/passwd
I'm trying to gain root acres from the password login screen.
If I don't already have it. But i have googled this extensively and have came up with one solution; exploiting LiLo. I would like to find an alternative
It sounds like you're trying to get into single-user mode, but all the commands you listed don't require single user mode. You can happily do all that in multi-user mode as the root user. Perhaps you can explain why you want, or think you want single-user mode.
Run level 3 will give you a text based login, like you're asking. Just modify inittab as I suggested in the first place (you will have to first login to X and use an xterm to do this). When you reboot, the computer should give you a console (text-based) login. If you have root permission on the computer in question, then you log in with a username of "root" and the root password you specified. If you don't have root, then there's nothing you can do.
Sounds like you installed Ubuntu when you should have installed Slackware.
Quzah.
Hope is the first step on the road to disappointment.
Basically what I am trying to do is produce a root shell at the login prompt. It's for a piece of mind so one day if my girl or a friend wants to be an dick and change the password, then I can circumvent that issue. I don't know why it's so hard to get an answer related to my question.
Maybe single user mode by typing Linux single at the LILO screen?
So you want to bypass all of your built in security and open a root bash prompt at your login screen?
What a great idea!
Why don't you just buy a thumb drive and set it up so you can boot off of it and mount your hard drives under it?
Quzah.
Hope is the first step on the road to disappointment.
I read that a lot of distros have that exploit patched. And I didn't want to do that. Basically if let's say my brother runs ubuntu and went to the bathroom but logs off and in order to login back in you need his password. Instead of rebooting can you type something or hit a combo of keys to get a shell To circumvent the password login
Quazah, cuz I don't want to. Or I wouldn't be here asking this question. I would still have to restart it. I will say again, I want a shell at the password prompt! Why is that so hard to understand?
While this is a general forum for general crap, you would be better served on the forums of whatever distro you have instead of a programming forum.
Quzah.
Hope is the first step on the road to disappointment.
This went great!
Your question seems to be, how can I reset the root password if somebody changes it.
You can't do anything from the boot drive to allow you to do this -- even if you boot to single user you still need a root password to log in. The answer is a boot disk. You boot from a recovery filesystem, then just directly access the /etc/passwd file on the messed up host and blank out the password field. Then reboot normally into single user, set the password. Problem solved.
This doesn't involve any "hacking." The only way someone could actually lock you out is by encrypting the whole filesystem. Of course, it goes both ways. Anybody with physical access to your box can use this trick to reset your passwords as well.
If you have friends who would do crap like that to you, I suggest finding better friends. Also, why do they have root in the first place?
Code://try //{ if (a) do { f( b); } while(1); else do { f(!b); } while(1); //}