Mentions how to enter single-user mode in the Gurb interface, in which the user does not need to enter any password to enter the system. So I looked at how Ubuntu enters the system in single-user mode through the Grub interface. The experimental steps are as follows:
1. Restart the system, press and hold the SHIFT key to enter the Grub interface
2. Select the Ubuntu advanced option and enter
3. Select the line with recovery mode and press ' E ' to edit the startup item.
4. Change the RO as shown to RW, can write, if the RO into the system, the file system will be read-only file system, can not modify the contents. After that, the Ctrl-x or F10 boot system enters the following interface
5. Select the line after root Drop to root shell promt and press the TAB key to move the cursor to OK, then enter the Ubuntu system as the root user, entering the command at the bottom of the window. If the user does not have write permission when you first view the sudoers file, you need to add write permission.
At this point, you can arbitrarily modify the contents of the system, because there is no need to enter any password, so the method is more dangerous. When you forget all user names and passwords, you can enter the system by this method, and then modify the root password to create new users and so on ...
Finally, we enclose the format for modifying the sudoers file:
User all= (All) all
%group all= (All) all
User all= (All) Nopasswd:all
%group all= (All) Nopasswd:all
First line: Allows the user to execute the sudo command (requires a password).
Second line: Allow users within group groups to execute the sudo command (password required).
Line three: Allow the user to execute the sudo command, and do not enter a password at the time of execution.
Line four: Allow users within group groups to execute the sudo command, and do not enter a password at the time of execution.
Ubantu Single-User mode entry system