7 easy steps to reset forgotten root password on CentOS/Red Hat
2. Press e in order to edit commands before booting.
3. Highlight the list item with vmlinuz in it by using the arrow keys and press e.
4. Now type single or init 1 at the end of the line.
5. 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)
Now it's time to change the password:
6. Type passwd
### Shell Commands ### passwd Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully7. Type reboot to restart the system.
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)