If system is still accessible as root (i.e. if root user is able to login to the system), then root password can be reset by simply executing the following command :
# passwd
It will ask to enter the new password and thus it can be reset.
If it is not possible to login as root, boot in to the Single User mode for changing the root password.
Follow the instruction given below to achieve this:
# passwd
It will ask to enter the new password and thus it can be reset.
If it is not possible to login as root, boot in to the Single User mode for changing the root password.
Follow the instruction given below to achieve this:
- Reboot the system and when grub prompt appears, press e to edit and select the kernel line.
- After selecting the kernel line, press e again to edit append 1 at the end of that line.
- Once done, press Esc and then press b to boot.
- The system will boot into single user mode, and execute passwd command there to change the root password.
- If that does not work properly, instead of appending '1' on the kernel line, put the word single or the letter s.
No comments:
Post a Comment