This article mainly introduces how to set ubuntu login with the root permission. For more information, see the following tag: Ubuntu
By default, users are not allowed to log on as root in Ubuntu. you can find the following methods on the Internet:
1. first set the root password, use the existing administrator account to log on to Ubuntu, execute the command: sudo passwd root on the terminal, then enter the password and root password, and repeat the password. In this way, a root user is available.
2. by default, you are not allowed to directly log on to the GUI using the root account. You can modify the vi/etc/lightdm. conf file to allow the root user to log on directly,
Add greeter-show-manual-login = true allow-guest = false. the modified configuration file is
[SeatDefaults]
Greeter-session = unity-greeter
User-session = ubuntu
Greeter-show-manual-login = true # manually enter the user name and password for logging on to the system
Allow-guest = false # logon from guest is not allowed
Restart ubuntu. The "login" option will be available in the logon window. at this time, we can log on through the root account.
If the above method still cannot be solved, perform the following operations:
Modify the/etc/pam. d/login file:
Copy codeThe code is as follows:
Gedit/etc/pam. d/login
Find
Copy codeThe code is as follows:
Auth [success = OK new_authtok_reqd = OK ignore = ignore user_unknown = bad default = die] pam_securetty.so
Modify it to the following content:
Copy codeThe code is as follows:
Auth requisite pam_securetty.so
After completing the above operations, restart the computer. Now, the root user can log on to the computer.