Linux uses the same process, like Windows, after a long time, you will forget to set the super user password. We know that under Windows The Superuser is administrator, while the superuser under Linux is root. So, Let's start by explaining how to set a new root password when Linux forgets the root password (for example CentOS 6.8).
1. Restart your Linux operating system and press ENTER or ↓ in 3 seconds. The following interface can be seen:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/85/E5/wKiom1etkZngTUU-AAAQQK4L8QY373.png "title=" 2016-08-12_170618.png "alt=" Wkiom1etkzngtuu-aaaqqk4l8qy373.png "/>
Description: ' E ' means editing at the command line before starting the system. ' A ' indicates that some parameters of the kernel can be changed before the system is started. ' C ' means entering the GRUB command line.
2. Press the E key, after selecting the 2nd line, the following interface appears:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/85/E5/wKioL1etkb6S6oIbAAAVqvSUZy8853.png "title=" 2016-08-12_170652.png "alt=" Wkiol1etkb6s6oibaaavqvsuzy8853.png "/>
3. Press the E key again and the following interface appears:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/85/E5/wKiom1etj6axWAllAAALZZ9p6BA455.png "title=" 2016-08-12_165746.png "alt=" Wkiom1etj6axwallaaalzz9p6ba455.png "/>
4. Enter "single" or "1" for "s" after quiet, and note that there are spaces behind the quiet.
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/85/E5/wKiom1etkEvxZTCxAAAMQsiFAGg032.png "title=" 2016-08-12_165946.png "alt=" Wkiom1etkevxztcxaaamqsifagg032.png "/>
When the input is complete, press the ENTER key and restart the system by pressing the B key.
5. After entering the system, you can enter passwd, then change the root user's password.
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/85/E5/wKioL1etkk_jbgTuAAAmTOsUlgw905.png "title=" 2016-08-12_170837.png "alt=" Wkiol1etkk_jbgtuaaamtosulgw905.png "/>
After modification, reboot the system (reboot or init 6 or shutdown-r now).
This article is from the "your attitude determines your future" blog, please be sure to keep this source http://marse.blog.51cto.com/11586237/1837377
Linux uses single-user mode to modify the root password.