need Whether it is a Windows system or a Linux system, we may forget the password for various reasons. In order to preserve the data, it is not recommended to reinstall the system. Experimental environment 1. CentOS 7 virtual machine 2. Change the password to 123456 (just for demonstration) step 1. First, start the system and enter the boot interface. Press "e" in the interface to enter the editing interface. 2. Enter the editing interface, use the up and down keys on the keyboard to move the cursor down, find the line number that starts with "Linux16", and enter at the end of the line: 3. Then, after the input is completed, just press the shortcut key: Ctrl+x to enter the single-user mode. 4. Then, in the new editing interface, enter "ls" at the end 5. Next, enter the following in the position where the cursor is blinking (the position of the last line): mount -o remount,rw / Note: There is a space between mount and -o, and between rw and /. They cannot be omitted. 6 Then, enter: passwd at the end of the new line, and press the Enter key on the keyboard when you are finished. 7. In the pop-up content, you can modify the password. Enter the new password at the position where the cursor flashes (the password is not displayed when entering, just like no response. Just remember that the password you entered is correct. Press the Enter key on the keyboard after completion. 8. Then, enter the password you just entered again. After the password is successfully changed, the password will be displayed in the format of passwd....., indicating that the password has been successfully changed. 9. Input: touch /.autorelabel Note: There is a space after touch and /) 10. Restart the system exec /sbin/init 11. Next, wait for the system to automatically change the password. After completion, the system will automatically restart. 12. Enter the root account and the modified password 123456 in the pop-up user name Next, after a successful login, the interface will prompt detailed information of the last login. After a successful login, enter the system and open the terminal, and you can use it normally, indicating that the password has been successfully changed. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: The difference and usage of LocalStorage and SessionStorage in vue
>>: Vue implements star rating with decimal points
Considering that many people now use smartphones, ...
1. Add Maria source vi /etc/yum.repos.d/MariaDB.r...
Today, when I was building a redis environment in...
In the table header, you can define the light bor...
1. Download Download address: https://dev.mysql.c...
This article example shares the specific code of ...
The file name of the dynamic library file under L...
Table of contents Basic Overview Enable GTID onli...
Regarding the nginx panic problem, we first need ...
//MySQL statement SELECT * FROM `MyTable` WHERE `...
question: My blog encoding is utf-8. Sometimes whe...
Table of contents Master-Master Synchronization S...
Problem Description In the recent background serv...
1. Prepare data The following operations will be ...
Preface For the permissions of files or directori...