LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-31-2006, 10:27 PM   #1
Ruzzell
LQ Newbie
 
Registered: Jan 2006
Posts: 3

Rep: Reputation: 0
Question RedHatLinux ,Recover lost root password with GRUB boot loader


Hello
I'm quit new for LINUX.

My , Red Hat Linux kernel version is 2.4.20-8

AND
It boots with GRUB boot loader version 0.93

I did not use linux for few months and I fogot root password. Now I have no account. Is there any way to recover root password with using floppy.
 
Old 01-31-2006, 11:33 PM   #2
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
http://www.redhat.com/docs/manuals/l...ng-single.html

you just need to boot into single user mode. I know it's a redhat manual, but this is for booting in either grub or lilo. so anyway, boot into single user mode and then you can use the passwd command to create a new password.

edit: if you've set a grub password, i hope you know it or else the only other way I can think of is to use a live cd and mount the hard drive and manually delete the password portion of the root entry in /etc/passwd or /etc/shadow if you're using password shadowing.

Last edited by megaspaz; 01-31-2006 at 11:35 PM.
 
Old 01-31-2006, 11:45 PM   #3
sewer_monkey
Member
 
Registered: May 2002
Location: Toronto, ON, Canada
Distribution: Ubuntu, Debian, RedHat/CentOS
Posts: 624

Rep: Reputation: 31
By the way, don't use the root account. If you have no other accounts on the system that's bad. You should only use the root account when absolutely necessary. It's especially bad to use the root account to go on the Internet.
 
Old 02-02-2006, 01:20 AM   #4
gaurav_gupta082
LQ Newbie
 
Registered: May 2005
Posts: 4

Rep: Reputation: 0
recover your system.

hi,
with your bootable floppy of linux or with the first cd of linux, enter in rescue mode. After you entered in single user mode, please type command
chroot /mnt/sysimg
now open file /etc/passwd, in this file there is a line like:
root:x:..................................
remove this x that is after root and save the file.
now open file /etc/shadow, in this file there is a line like:
root:asdf45traf2345asf:............................
remove whatever appear between these two column. save the file and restart the system with the hdd.
now you are not require to enter root password, only press enter when it asks for password.

Quote:
Originally Posted by Ruzzell
Hello
I'm quit new for LINUX.

My , Red Hat Linux kernel version is 2.4.20-8

AND
It boots with GRUB boot loader version 0.93

I did not use linux for few months and I fogot root password. Now I have no account. Is there any way to recover root password with using floppy.
 
Old 02-02-2006, 05:40 AM   #5
chinnasai
LQ Newbie
 
Registered: Jan 2006
Posts: 1

Rep: Reputation: 0
name the browser which will run on uClinux
 
Old 01-07-2011, 03:21 PM   #6
Santosh Pawar
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Thumbs up Linux Redhat 'root' user Password Recovery

How to recover / change the root password on RedHat Linux based systems

When you lost your root password in a RedHat Linux Based systems you should first have access to the console, (the machine itself).

Power on, or reboot as needed.

and as soon as you get first screen (or similar depending your system and configurations)

Now you should press 'e' and you will get next screen.

Select the image you would like to boot, and press 'e' again, and as soon as you get the next screen

Insert an space and the number one '1' as shown in the image.

After that press ENTER and 'b' and ENTER again.


Your will now have your System booted as a single user and you will have no need to enter a password.

Now you can change the password like this

#passwd

#reboot

And you will have againg your system working.

Kindly find the below link for more details:-
http://www.go2linux.org/fedora-cento...sword-recovery
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lost mysql password, can't recover slackhack Linux - Software 1 12-03-2005 06:15 PM
How to recover a lost username / password for Solaris 7 at gui login screen noitwhiz Solaris / OpenSolaris 2 09-29-2004 01:32 PM
Loaded Linux, lost login ID and password for superuser? How can I recover? PaulK Linux - Newbie 3 08-24-2004 11:01 PM
recover boot loader utsav_verma Linux - Software 3 04-01-2004 10:09 AM
Recover Root password Dannyb Linux - Newbie 7 10-25-2001 01:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration