Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-24-2006, 07:06 PM   #1
LQ Newbie
Registered: Jan 2006
Posts: 9

Rep: Reputation: 0
i don't know my grub/root password

i got this linux redhat 9.0 used and don't know the password

please help
Old 01-24-2006, 07:12 PM   #2
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
Boot into rescue mode (use cd1 of the install discs)
Mount the disk.
Mount your Linux disk to mountpoint, for example /mnt

mount /mnt /dev/hdXx

Now you can go to the mounted disk

cd /mnt

Use vi, vim, or nano to edit the files

What your need to edit
Try now to edit your file /etc/passwd by vi or sed. But, attention!
Your file /etc/password is in fact /mnt/etc/passwd. You need to edit
the line contains the word "root". For example, if your /etc/passwd
contains the line


edit it and blank out the password field to the next:


You should be able to login as root and you needn't any password for root.
After that, don't forget to change your root password to new one.

passwd <newpassword>
Old 01-24-2006, 07:30 PM   #3
LQ Newbie
Registered: Jan 2006
Posts: 9

Original Poster
Rep: Reputation: 0
i don't have the boot cd
Old 01-24-2006, 07:43 PM   #4
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
Use a live cd. knoppix or something. If you don't have one, download one, they are nice to have around
Old 01-25-2006, 02:55 AM   #5
The Doctor
LQ Newbie
Registered: Jan 2006
Posts: 9

Rep: Reputation: 0
Does this mean that I could break into the root of any Linux system with just a boot cd? Or can a system be protected against this?
Old 01-25-2006, 03:16 AM   #6
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Blog Entries: 2

Rep: Reputation: 30
Yes. If you want, you can disable the "boot from CD" option in the BIOS, then password-protect the BIOS settings, but even that can be overcome with enough effort. Such heroic measures are really unnecessary in most cases.

It's like securing your house; a good deadbolt or rimlock on the door combined with other standard security measures will usually suffice to keep the undesirables out, or you can go nuts and install multiple locks on the doors and bars on the windows in an effort to keep out a few more.

Either way, a really determined person can still get in by driving a car through your wall.
Old 01-25-2006, 03:39 AM   #7
Registered: Aug 2004
Location: bangalore
Distribution: Redhat,Ubuntu
Posts: 64

Rep: Reputation: 15
Try this

At the grub menu, type 'e' (edit)

which has kernel in it, and type 'e'
goto end of kernel line & type 'init 1'
and press enter

then type 'b'(boot)

The above is for no password boot,
u can add users & password later

Then type 'init 5' & login as new user
Old 01-25-2006, 05:54 AM   #8
Registered: Jan 2006
Posts: 44

Rep: Reputation: 15
root pass word

go to single user mode and there u type your new root passwd and then enter


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
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
Change Root password on Grub 0.94 mikeshn Linux - General 5 03-10-2005 11:09 AM
root and grub password mbayeb Linux - General 3 11-24-2003 07:06 AM
grub use for root password lockout dponte Linux - Newbie 1 10-18-2003 05:13 AM
Grub and root password mbayeb Linux - Software 1 12-20-2002 10:27 AM > Forums > Linux Forums > Linux - Newbie

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

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