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 ….

extradrmtech

Since 30 years I work on Database Architecture and data migration protocols. I am also a consultant in Web content management solutions and medias protecting solutions. I am experienced web-developer with over 10 years developing PHP/MySQL, C#, VB.Net applications ranging from simple web sites to extensive web-based business applications. Besides my work, I like to work freelance only on some wordpress projects because it is relaxing and delightful CMS for me. When not working, I like to dance salsa and swing and to have fun with my little family.

You may also like...

Leave a Reply