The default root user of the Ubuntu system cannot log in, and the password is empty.
If you want to use the root user to log in, you must first set the password for the root user. Open the terminal, enter: sudo passwd root, and then press enter. At this time, you will be prompted to enter the password. After password: enter the password of the user you are logging in now, and then the system will prompt you to enter a new UNIX password. Enter new UNIX password: enter the password you want to set for the root here. You need to enter twice At this time, the system will be prompted that the password is set successfully. Finally, exit the terminal, restart the computer, select the place where the user enters the system, select others, and then enter root and then enter the password of root to log in! In fact, ordinary users can log in and enter the command sudo – S – h in the terminal to switch to the root authority
The above implementation of using root user login / switching root permissions in Ubuntu is the whole content shared by Xiaobian. I hope it can give you a reference and support developer.