Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

root password

Status
Not open for further replies.

herri

ISP
Joined
Feb 19, 2002
Messages
6
Location
ID

Dear All
I have Linux Server (Redhar 6.2) to run MRTG but I can't log
into it as root because I forgot root password, how to recovery root password ?
thx
Herri H, CCNA, CCNP cand
 
Hi,

As long as there is no password set in lilo itself, you can just boot to runlevel 1 and change it with 'passwd'. When you get the lilo prompt append 'linux single' or 'linux 1' so that it looks like :

lilo : linux 1

Then press enter....

The system should just stop with a root prompt , i.e. without requiring a password. You are then root and you just change your own password as :

# passwd

If you have a password-protected lilo then you need to boot from floppy or CD, mount the original root partition somewhere and 'cat' the /etc/lilo.conf file to see the lilo password. For example :

# mkdir /mnt/temp
# mount /dev/sda1 -t auto -o ro /mnt/temp
# cat /mnt/temp/etc/lilo.conf
# umount /dev/sda1

(Obviously /dev/sda1 is just an illustration of your real root partition - use the correct value for your system).

If you have problems getting an (unprotected) boot disk / cd try toms root / boot disk from
Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top