Single-User mode
Rebooting Linux into the Grub interface
In the system boot interface, such as
650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M00/9A/41/wKioL1lTZPqAxTomAAATgVx_mb4781.png-wh_500x0-wm_ 3-wmp_4-s_836136213.png "title=" 1.png "alt=" Wkiol1ltzpqaxtomaaatgvx_mb4781.png-wh_50 "/>
Select the first item, and press the E key, enter the edit interface, find the line beginning with linux16, move the cursor to the RO, change the RO to RW init=/sysroot/bin/sh press ctrl+x key to start
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M00/9A/41/wKioL1lTZV-A7yLoAAArvWB23g8229.png-wh_500x0-wm_ 3-wmp_4-s_2866864208.png "title=" 2.png "alt=" Wkiol1ltzv-a7yloaaarvwb23g8229.png-wh_50 "/>
After starting to enter the interface as shown below, first enter the original system chroot/sysroot/enter the original system can change the password passwd root if there is an abnormal character, may be a font problem caused lang=en to change the font to English reset password after input touch/.autorela Bel Enter and restart the system.
650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/9A/41/wKioL1lTZkawctOvAAAjADMfoEU545.png-wh_500x0-wm_ 3-wmp_4-s_1360779650.png "title=" 3.png "alt=" Wkiol1ltzkawctovaaajadmfoeu545.png-wh_50 "/>
Rescue mode
If grub is masked and cannot enter, you need to change the password through rescue mode.
1. Enter the system BIOS, set the optical drive to the first boot order, and load the system installation disk into the optical drive to start the system.
2. Select "Troubleshooting" in the Select Installation system interface
3. Select "Rescue a CentOS Linux system" in the next screen
4. In the popup "1. Continue 2. read-only Mount Partition 3. Skip Shell 4. Select 1 when exiting restart.
5. After selecting 1, the following interface appears, similar to the single-user mode, just into the/mnt/sysimage
We switched back to the original system chroot/mnt/sysimage/
Then change the password passwd root
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M01/9A/41/wKiom1lTaP-iQ5CrAAAkZkf35kY970.png-wh_500x0-wm_ 3-wmp_4-s_1341513560.png "title=" 4.png "alt=" Wkiom1ltap-iq5craaakzkf35ky970.png-wh_50 "/>
6. Eject the optical drive and modify the BIOS boot sequence. Finish
This article is from the "fonphxion" blog, make sure to keep this source http://fonphxion.blog.51cto.com/6434529/1942761
Linux Modify root password single user mode and rescue mode