Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
help i have forgotten my root password.
I am running red hat 6.2
and starting from a boot disk.please reply asap

it's hard or unable to recover the original password.
but there're some methods you can overwrite it with new passwd.*in case of you can type kernel options
at "LILOboot:" prompt,
type "linux single"(without the quote^^) at LILO Boot:.
then system will asume you as root, and asks no password. until you get shell prompt.
now you've got shell propmt, you can overwrite the forgotten password with the command "passwd".* in worse case, when you enter "linux single" and LILO asks you another password.
in this case you shoud have the bootdiskettes which can boot without hdd's root partition, called as "rootdisk".
you can find it on web using the key word "rootdisk" not "bootdisk" or something like "imergency disketts".
if you managed to get rootidsks you can boot without hdd's root partiton and can mount hda1(for example) like this
#mount /dev/hda1 /mnt
then you can manipulate the password concerning stuff.sorry for my coward english.

Please follow the steps below to recover the Root Password.
If you have lost the root password,
1) Reboot and get the boot prompt (press Alt as soon as
Lilo appears on screen).
2) Then enter linux init=/bin/sh which will bring you to
a shell (console - no X).
3) After this enter: mount -n -o remount, rw /dev/hda(x)[ Note: hda(x) is usually hda1 - where the root partition is. ]
4) This re-mounts the filesystem read-write.
5) Then enter :vi /etc/shadow
6) This starts the vi editor and loads the /etc/shadow file.
7) Then remove the password string for root (which is between
the first and second colons - that is, between : ).
8) Then save and quit (that is, :wq)
9) Now enter :sync
10) Wait a few moments and enter reboot
11) You can then login as root without a password and set
a new root password.Note: sync writes the data in a buffer to disc - if you omit this,
you will find that your changes were not written to disc and you
are back where you started.

I have used this method to recover my password in Red Hat Linux 6.2. It works like a champ. Thanks for the help

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |