How to Recover the Password for root on CentOS 5.7

Share this Article :

In this post i will show how password recovery for lost root account’s password is performed. This is especially for those who always forgot their CentOS 5.7 root password. The steps is easy as below :

1. Reboot the CentOS machine
2. When booting up, press any key to go into the select menu.
3. The press ‘e’ to navigate to second grub.conf line (kernel)

recover
4. Press ‘e’ to edit the line :
recover
5. Add ‘single’ to “ro root=LABEL=/ single” as below :
recover
6. At ‘#’ command line, type ‘passwd’ to create new password. Then reboot machine as usual.
recover

2 Comments

  1. Victor Dias

Leave a Reply