Forgot Root Password?
I had this problem few months back, but hey this is not the end of the world and most of you I believe already knew how we can reset the old password to the new one. There are few method and some working nicely with Noguix, Slackware and some only work with SLES and Opensuse. :-
1) Boot to init 1
This method known to be work with Noguix and Slackware, just reboot your machine, at the grub menu just simply press “e” button then put “single” or “init=/bin/bash” parameter at the end of your kernel line. Press “Enter” then press “b” to boot the machine with new appended line. Normally after this you will get a prompt “bash#” then,
bash#passwd
You need to key in the new password and reconfirm it once again. Reboot your machine and login with your new root password.
2) Edit /etc/shadow
This known to be work for almost Linux Distro with 2.4 kernel
- Boot your machine with Noguix live-cd
- mount -t ext3 /dev/sdaX /mnt/sdaX -o rw (which sdaX is your root partition)
- vi /mnt/sdaX/etc/shadow
- Remove everything from first and the second coluns
- root:$1$F1i/2no5$IAIkqIHzcR5SOhM/1WiOy.:14198:0::::: and should become
- root::14198:0:::::
- Save it, $cd and unmount the drive with $umount /mnt/sdaX
- Reboot your machine without live-cd.
- You then will be asked for new password
3) Chroot
This method can be used for SuSE and OpenSuSE machine and mostly work on all type of Linux Distro
- boot with any live-cd
- $mount -t ext3 /dev/sdaX /mnt/sdaX -o rw (/dev/sdaX must be your root partition)
- $chroot /mnt/sdaX /bin/bash
- $passwd
ariyossss
athlon_crazy 25/12/2008 21:49pm
No comments
