LINUX and STUFF

All about linux inside, networking, programming,server,tutorials, Open Source resources software and hardware and the other stuff.

Thursday, March 02, 2006

Recovery Root Password

"Oh my god i forgot my root password. Help me."
If you are a Linux Administrator who manage many server, this is very big big problem.Stay calm and i will give you some tips how to fix this trouble.

Solution

1. Using Grub Loader
First step that you can use is add single parameter, when Grub menu show. Example when grub menu show press 'e', and you'll see this line :

title Fedora Core (2-6.11-1.1369_FC4)
root (hd0,0)
kernel /boot/vmlinuz-2.6-11-1.1369_FC4 ro root=LABEL=/1 rhgb quiet

initrd /boot/initrd-2.6.11-1.1369_FC4.img

After that menu show, add single word in the end of third row.
kernel /boot/vmlinuz-2.6-11-1.1369_FC4 ro root=LABEL=/1 rhgb quiet single
Press enter and then press 'b'. Wait for a moment and you will go to init 1 with root user. From that command prompt you can make a new password with passwd command.

2. Using Knoppix Live Cd
For using this way boot your computer with Knoppix Live CD. When first parameter show from knoppix, type option 'knoppix 2' to get in command prompt only.Mounting linux partition that you want to recover.Ex. Fedora Core partition is in /dev/hda1.

root@tty[/] # mount dev/hda1 /mnt/hda1
Then chroot to linux partition that you have mount.
root@tty[/] # chroot /mnt/hda1 /bin/bash --login
Now you have login as root user. The next step is make a new password with passwd command.
root@tty[/] # passwd
After all finish type exit and reboot your computer.

keyword:root password recovery, repair linux
 
Web www.linuxscience.blogspot.com

0 Comments:

Post a Comment

<< Home