LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   why password in emergency mode? (http://www.linuxquestions.org/questions/red-hat-31/why-password-in-emergency-mode-529099/)

linuxguy99 02-14-2007 04:33 PM

why password in emergency mode?
 
Anybody know why am I prompted for the root password when booting into emergency mode? That doesn't happen in single user mode.

Thanks

Lenard 02-14-2007 05:10 PM

Because; http://www.redhat.com/docs/manuals/e...emergency.html

linuxguy99 02-14-2007 06:06 PM

that just says how to get into emergency mode - not why I need the root password to get into emergency mode. I can get into emergency mode because I know the root password, but why doesn't single user mode ask me for it? I mean, if I have physical access to the box anyway, what difference does emergency mode make to have to ask for the root password?

Brian1 02-14-2007 07:23 PM

I never tried the option emergency before so I rebooted and see it ask for root's password just after kernel is loaded and before any runlevels are started. Only thing it mounts is the / partition and creates /proc. The / partition is mounted as read-only.

I don't see much of a benefit for it. I guess you can / as read-write and mount additional partitions needed. I don't see the need for it since I have like /usr and /home as seperate partitions. Not mounted in this mode. Why it would need root's password I am not sure unless you could hack the kernel at this point before the system is loaded. Once you type exit the system continues to load as if no stopping of the boot process was done.

How about asking the Redhat team and see what they say the usage of this mode. Post if you get an answer back.

Brian

Lenard 02-15-2007 06:21 AM

Did you not notice that the partitions are read-only and almost nothing is loaded?? This mode is only used when you have a major issue with the filesystems and/or the init process (even single user mode cannot start for example). This safeguards the data so one can transfer/backup the information, root's password is need so the coreutils can used.

linuxguy99 02-15-2007 09:53 AM

Yes, I know that emergency doesn't start init etc. and that you need to manually mount partitions, including /proc, and set / as rw if necessary, however, the point of the root password is really unknown as if I can boot emergency, I have to be physically at the box. So, I might as well even just boot into rescue mode off CD 1 and bypass emergency altogether and not be bothered with the root password. So, I can't see why it is asked for in emergency if I can just bypass it altogether using rescue where I can use the same utils.

linuxguy99 02-15-2007 03:11 PM

just to add to this, if you pass init=/bin/bash to the kernel on boot, you get the same effect as using "emergency" or "-b" but without the password prompt. Strange.

Brian1 02-18-2007 10:25 AM

Well spent some time searching and asking on a few other forums. No one knows why. Only thoughts is something about maybe security. I would the only ones that will know the answer is the Redhat Team. I am sure they have to know why they did it. If you get an answer please post back. The world outside of Redhat would like to know.

Brian

wmakowski 02-18-2007 01:18 PM

42! My best guess is they just want to make you more conscious of the fact that emergency mode is a little different than booting in single user mode. By entering the root passwd you acknowledge the fact that you really do know what you are doing. :)

Bill


All times are GMT -5. The time now is 10:23 PM.