Computing.Net > Forums > Linux > fogotten root password

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

fogotten root password

Reply to Message Icon

Name: gareth
Date: July 18, 2000 at 23:18:33 Pacific
Comment:

help i have forgotten my root password.

I am running red hat 6.2
and starting from a boot disk.

please reply asap



Sponsored Link
Ads by Google

Response Number 1
Name: kim yun-ho
Date: July 19, 2000 at 03:13:34 Pacific
Reply:

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.


0

Response Number 2
Name: Sherlocks
Date: July 21, 2000 at 21:21:28 Pacific
Reply:

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.


0

Response Number 3
Name: brian ross
Date: January 19, 2001 at 09:43:31 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: fogotten root password

root password break www.computing.net/answers/linux/root-password-break/25247.html

I loss my root password www.computing.net/answers/linux/i-loss-my-root-password/21042.html

lost root password www.computing.net/answers/linux/lost-root-password/25664.html