Here I tell you what I did
- Reboot server.
- Press downarrow key, and grub-boot loader screen appears.
- I select the line start with "kernel /boot/vmlinuz-2.6.26-2.686 root=/dev/sda1 ro quiet".
- Press 'e' to edit the argument and modify the line to: "kernel /boot/vmlinuz-2.6.26-2.686 root=/dev/sda1 rw single init=/bin/bash"
- Press 'b' to boot
- Bash prompt appears....but I was facing the problem that the keyboard did not work..(I've got error messages something like:"Device not accepting", "Unenumerate", that tell USB port not recognized)....I am using KVM Switch. I did unplug the USB keyboard from KVM Switch then plugging in another USB keyboard.
- After repeating steps 1-5, I was able to type using the new keyboard.
- I was trying using mount command such as:
#mount -n -o remount rw /
#mount -rw -o remount /
#mount -t ext3 /dev/sda1 /usr
but passwd command failed. ("bash: passwd: command not found")
(Perhaps it would works if I (re)mount rest of all my partitions in read/write (rw) mode such as /usr /var etc, but i did not do at the time).
What I did then was disabling the root password from the password file using Nano editor. I've check that the second data field in /etc/passwd is “x” for every username, so the system uses shadow passwords, and I must edit /etc/shadow.
- #nano /etc/shadow
I changed==> root:this_is_the_encrypted_passwd:15401:0:99999:7:::
to this ====> root::15401:0:99999:7:::
(Edit the second data field in the password file so that it is empty.)
Reboot the system and at the login prompt, type root (without password).
Tidak ada komentar:
Posting Komentar