Home > Article > Operation and Maintenance > What to do if you forget your password in centos
What should I do if I forget my password?
1. First turn on the system and hold down the esc key
2. Then press the e key according to the prompts to enter the editing options
3. Edit and modify two places in the UTF-8 line. Change ro to rw, that is, change read-only permission to read-write permission, and then add init=/bin/sh at the end.
4. At this time, hold down the Ctrl x shortcut key to enter the rescue mode
5. Modify the new root The password is 123456. The modification command is as follows
6. After the password is successfully modified, the following prompt will appear
7. Enter Update the system information with the following command
8. Enter the following command to restart the system
9. At this time you can Use your modified new password 123456 to log in to the system
Recommended learning Linux video tutorial: https://www.php.cn/course/list/33. html
The above is the detailed content of What to do if you forget your password in centos. For more information, please follow other related articles on the PHP Chinese website!