Linux_Solve forgot root password!!!

####root password forgot######

We often encounter this situation

Frequent password changes are for security, but memory is a big hassle

No one should put too much trust in their own memory

How should this be the case? (it's so tricky.)

Enter the topic below

1. Reboot the system

2. In the system startup phase, press the up and down keys to stop the system system boot

3. Select the boot boot title and press "E" to edit

4. Find the line of the linux16 boot entry, delete the ro option from the end of this line, change ro to rw, and then add the rd.break option


5.ctrl+x to start the system boot entry after setting

6. After entering the system, execute chroot /sysroot to switch to the real system environment


7.passwd root to modify the super user password

8. Create a file/.autorelabel to let the system rescan all files

9.exit twice to automatically restart the system

Then just wait for the progress to complete! ~~~

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326023488&siteId=291194637