Okay, so here’s the situation: your co-worker is on vacation/got hit by a bus/won the lottery (pick one) and just before he left, he changed the root password on your Red Hat/CentOS server without telling you. Here’s how to reset the root password.
1. Reboot the server.
2. Interrupt the normal GRUB boot process by hitting the ESC key.
3. Hit the ‘e’ key to edit the default boot configuration. This will be the first line in the GRUB menu
4. Move down to the kernel line entry and select ‘e’ to edit kernel parameters.
5. Append the word “single” to the kernel arguments. This will boot the system into single user mode.
6. Type ‘b’ to boot the system. You should be presented with a root prompt.
7. From this prompt, you can run the passwd command to change root’s password.
8. Once complete, run the command “init 5″ to bring the system back up into multi-user mode.






Comments
What are some ways to protect against this kind of password resetting? Is it possible to password protect and/or encrypt grub?
Trackbacks
[...] it is possible to change the root password on Linux in a similar [...]