CentOS7 forget the root password how do?
Reset the root password must be carried out by local display or remote server management card interface.
Click for more technical fault Solution
1. Select the kernel reboot
Quick press the up and down keys, the purpose is not to make it into the system
2. enter edit mode grub
Selecting a first kernel, press the letter e grub enters Edit mode
3. Start Modify parameters
Linux16 find the beginning of the line, into the ro rw rd.break, modified good press ctrl + x, means that the temporary use of grub just modify parameters on the system.
4. Switch to the pseudo root
#chroot /sysroot/
* Chroot, that is, change root directory (change the root directory). In linux system, the system is in the default directory structure /, i.e. the root (root) begins. And after use chroot, the directory structure of the system at the specified location as the / position.
5. Changing the root password
#passwd root
6. wham system selinux file label
#touch /.autorelabel
#exit
Wham selinux labels, if less this operation, the system will not boot properly. Quit after the operation is complete.
7. Reboot the system reboot