Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lost root Password 1

Status
Not open for further replies.

rajeshbahl

IS-IT--Management
Jan 6, 2002
116
IN
We have lost the root password for our Red Hat Linux 7.3 .
We have the emergency diskette (created during installation).
Can we reset /change the lost password ?

Thanks In Advance
Rajesh K. Bahl
 
It depends on which bootloader you are running. On RH73, the default is GRUB. Here's the password recovery instructions for GRUB...

Booting into single user mode from the GRUB prompt to change root password...



1. Reboot the system, and when you are at the prompt where you can select which operating system, highlight the line for linux and press 'e'. You may only have 2 seconds to do this, so be quick.



2. This will take you to a similar screen with 3 entries, select the entry that begins with 'kernel' and press 'e' again. Append to the end of that line ' single' (without the single quotes). Make sure that there is a space between what's there and 'single'. Hit Enter and the new 'kernel' line should have 'single' at the end.



3. Press 'b' to boot into Single User Mode.



4. When the computer finishes it's bootup sequence, you must change the root (superuser) password to allow you into the system. There will be a 'sh- 2.05#' prompt (or something similar). Type 'passwd' and then enter the new password. It will ask you to retype the new password, do so. If it tells you that the password is BAD, and based on a dictionary word, ignore this, as it will accept the new password anyway. (you may want to think of a more secure password!). It will respond with 'passwd: all authentication tokens updated successfully'.



5. Type 'reboot' and when the computer boots up without your intervention, you should be able to log in as 'root' with the password that you just entered.


ChrisP
 
Chris, you ought to make a FAQ out of that one, I'm always forgetting how to single boot grub. Partly because I don't do it that often, but when I do it's been too far between times to remember. An infinite number of monkey typing at an infinite number of keyboards will eventually populate the internet.
 
I have a bunch of personal how-to's and notes that I've come across over time. Most of them I wrote myself, but some I copied from other sources. I'm not sure if I wrote that myself or if I copied it from somewhere else. Since I'm not sure, I don't want to write a FAQ on something that I didn't write in the first place, if that is the case.
 
Well, I posted a faq of instructions that I found on Linux Gazette, it was pure plagarism and I stated my source etc.. but I figured while the article was their property the instructions are generally known and thus public. I didn't just do a copy and paste, but I did find the information on their site. I just wanted it more readily accessible from the FAQ section of tek-tips. I think as long as you give credit to your source or at least state that you may have gotten the information from elsewhere it should be ok. Ultimately it's up to tek-tips whether or not they can keep the FAQ or not. An infinite number of monkey typing at an infinite number of keyboards will eventually populate the internet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top