Many times, because the root user, we are not commonly used, so forget the password is often the case, then how can we solve it? I now know that there are two types of boot-time access to single-user mode can be directly modified root password:
Method One:
The first step:
When powered on, it enters a 3-second wait state as shown in
This time you need to quickly put the mouse into the screen (I use the virtual machine, so need to manually click into it), followed by the following state:
Step Two:
This time, press the E key to enter the grub edit state, the following interface will appear:
Step Three:
Select the second item (beginning with the kernel kernel), and press the E key to enter the editor and enter:
Fourth Step:
At the end of the manual add a single, and press ENTER enter key, will return to the third step interface, but at the end there will be one, this time by pressing the B key, will go into one-user mode, and can be successfully opened, get root login privileges
Fifth Step:
After power-on, the acquired permissions are root
Change Password with command passwd
Follow the prompts, enter the new password two times, enter the reboot restart command to
The second method:
In the first method of the first step, press the A key, and then press the space bar, in the press 1 key, you can turn on the boot, after the operation of the same, no difference