Recover a forgotten Password for Centos
First, Try single user.
If you don’t see either a LILO or GRUB boot screen, try hitting CTRL-X to get one.
If it's LILO, just type "linux single" and that should do it (assuming that "linux" is the lilo label).
If GRUB, hit 'e", then select the "kernel" line, hit "e" again, and add " single" (or just " 1") to the end of the line
ro root=LABEL=/ rhgb quiet
Press ENTER, and then "b" to boot.
You should get a fairly normal looking boot sequence except that it terminates a little early at a bash prompt like below.
sh-3.2#
Type the command :
sh-3.2# passwd
If you get a “Give root password for system maintenance”, this isn’t going to work ….