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! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-24-2006, 07:06 PM
|
#1
|
LQ Newbie
Registered: Jan 2006
Posts: 9
Rep:
|
i don't know my grub/root password
i got this linux redhat 9.0 used and don't know the password
please help 
|
|
|
01-24-2006, 07:12 PM
|
#2
|
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381
Rep:
|
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
root:x3FrTg6uYT7.:0:0:root:/:/bin/sh
edit it and blank out the password field to the next:
root::0:0:root:/:/bin/sh
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>
|
|
|
01-24-2006, 07:30 PM
|
#3
|
LQ Newbie
Registered: Jan 2006
Posts: 9
Original Poster
Rep:
|
i don't have the boot cd
|
|
|
01-24-2006, 07:43 PM
|
#4
|
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381
Rep:
|
Use a live cd. knoppix or something. If you don't have one, download one, they are nice to have around
|
|
|
01-25-2006, 02:55 AM
|
#5
|
LQ Newbie
Registered: Jan 2006
Posts: 9
Rep:
|
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?
|
|
|
01-25-2006, 03:16 AM
|
#6
|
Member
Registered: Mar 2005
Location: Utah, USA
Distribution: Slackware 11
Posts: 816
Rep:
|
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.
|
|
|
01-25-2006, 03:39 AM
|
#7
|
Member
Registered: Aug 2004
Location: bangalore
Distribution: Redhat,Ubuntu
Posts: 64
Rep:
|
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
|
|
|
01-25-2006, 05:54 AM
|
#8
|
Member
Registered: Jan 2006
Posts: 44
Rep:
|
root pass word
go to single user mode and there u type your new root passwd and then enter
|
|
|
All times are GMT -5. The time now is 07:02 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|