In the root account to modify the/etc/passwd when the root account that row deleted, the other account login does not have permission to change/etc/passwd, so had to find ways to find online, using single-user mode into the CentOS,
Copying/etc/passwd-to/etc/passwd solves this problem.
1. How does CentOS get into the Grub menu interface?
When Linux boots, press E on the keyboard to enter the Grub menu interface.
2. When the Grub boot screen appears (CentOS (2.6.18-274**)), press the letter E key to enter the grub edit state.
3. Move the cursor to the kernel ... That line, and then typing "e" into the command line editor,
Add a space at the end of the kernel line single, enter
Type "B" to start the system, i.e. enter single-user mode,
4. This time you can use the passwd command to change the password.
passwd Root
After the change, reboot restarts.
January 4, 2012, tested 5 times, focus on "kernel line of the last plus a space single, enter"
CentOS enters single user mode