How to reset password for CentOS of root?

  1. Boot the Operating system and “Press any key to enter the menu”
  2. press any key.

Figure 1

  • Press e in order to edit commands before booting.
  • Search in the list item having Keyword vmlinuz in it by using the arrow keys.

Figure 2

  • Press e again to Edit.

Figure 3

  • type single or init 1 at the end of the line.
  • Then press enter and b to boot the system with the new argument. (The system will boot into single user mode and you will see bash prompt
  • After booting type: Type passwd

Figure 4

  • Enter Password for “root” user, and type “reboot” in order to restart system.

Figure 5

  • You done with reset password of CentOS. Login with username “root” and Password which you just set.

Share Post