The root of Ubuntu is forbidden by default, and the password of root is not required to be set during installation. To use it, just set the password for root, sudo passwd root. If you just forget the password of ordinary users, you can change it with root. If you forget the root password, enter single user mode
Enter single user mode:
1. When booting to grub loading, please wait…, press ESC to enter the Startup menu, select the recovery mode of the corresponding kernel version, and press e to enter the editing state
2. Move the cursor, change “recovery nomodeset” to “rwsingleinit =/bin/bash”, and then press Ctrl + x to enter single user mode
Then we can use the command passwd to change the password
See: root @ (none):/# enter “passwd” immediately
See: enternewunix password: enter “123” immediately
See: retypenewunix password: enter “123” immediately
The new password is 123
4. Enter “reboot” enter! Can also ctraltdel. In short, restart it
1. Start the system. During startup, press ESC or shift key repeatedly until the following interface appears:
Move up and down, select advanced options for Ubuntu (or some versions show advanced options for Ubuntu), and then press’ Enter ‘to enter the following interface
Select Ubuntu, with Linux 4.13.0-38-generic (recovery mode), as follows:
Press the ‘e’ key to enter the interface as follows
Move the cursor through the up and down left and right keys to find the line of Linux/boot /… Ro recovery nomodeset, as shown below
Change ro recovery nomodeset in the figure to quiet splash RW init =/bin/bash, and the result is as follows
Press’ Ctrl + x ‘for a few seconds to enter the interface as follows:
Enter the command passwd as follows
Press “enter”, the interface is as follows:
After entering the password once, press “enter” and press enter to enter the password again. The interface is as follows
After entering the password twice, press the “enter” key, and the interface is as follows:
The password is entered successfully
Restart the computer (if it is a virtual machine, restart the virtual machine), enter the terminal, enter the command Su – the interface is as follows
Enter the password you just set. The interface is as follows
Similar Posts:
- sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, q…
- Setting root password after installation of Ubuntu 20.04 LTS
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- When installing MySQL database on MAC, the system prompts MySQL: command not found
- When installing MySQL database on Mac OS, the system prompts MySQL: command not found
- For piix4_ Solution of SMBus * * host SMBus controller not enabled (detailed steps summary)
- [Solved] Git Error: failed: authentication failed for ‘http: XXXX.git / ”
- [Solved] Ubuntu Startup Errors were found while checking the disk-drive for /
- [Solved] Error 1054 (42s22) unknown column ‘password’ in ‘field list’ when updating the password of mysql5.7 or above
- [Solved] after installing Ubuntu 16.04, you cannot enter the graphical interface after restarting (error/dev/sda2: clean…)