Operating System - Linux
1822272 Members
3840 Online
109642 Solutions
New Discussion юеВ

Re: Single user mode startup problem.

 
SOLVED
Go to solution
Michael_590
Occasional Advisor

Single user mode startup problem.

Hello.

Could you please advice what to do.
I try to login to the system (Red Hat 9) in the single user mode by editing boot process (I add "e" at the end of the line). But when the system goes up at the miidle of the process I get the message:
"Give a root password for maintenance or Cntr-D for normal startup". If I press CNTR-D the system goes in the regular mode (not in the single user). And I don't know the root password. How can I startup or to change root password in that case?

Please help me. I'll be really grateful for any advice.
5 REPLIES 5
Steven E. Protter
Exalted Contributor
Solution

Re: Single user mode startup problem.

Linux is more secure than say stock HP-UX which does not require root login for single user mode.

You must give the root password to boot into single user mode.

If you don't know the root password, then you should boot of a rescue cd and modify the /etc/shadow file for root, then set the root password to something you know.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Eric van Dijken
Trusted Contributor

Re: Single user mode startup problem.

Wy not just use "init=/bin/bash"

For example, at the lilo prompt, type:

lilo: linux init=/bin/bash

This should get you into Single user mode with no password.

Then you could ofcourse use, at the lilo prompt (better) :
lilo: linux single

If you type the "e", it would get you in "emergency mode" which is not quite the same as single user-mode.

Watch, Think and Tinker.
Alexander Chuzhoy
Honored Contributor

Re: Single user mode startup problem.

in your case you should login to init 1 rather than Single mode.
Init 1 won't prompt for password,but will let you easily change it.
So edit the boot line (the one with kernel) in /etc.grub.conf
append 1 to it's end and boot this line (press b).
Michael_590
Occasional Advisor

Re: Single user mode startup problem.

Thank you for your advices.

Actually I couldn't start in the single user mode anymore, but I could mount /etc and change /etc/passwd file, so I could login without root's password and then to change it.


Thank you very much.
Michael_590
Occasional Advisor

Re: Single user mode startup problem.

I've found a solution here.