How to set root permission to log in in ubuntu
How to set root permission login in ubuntu, I believe many inexperienced people are helpless about this, for this reason this article summarizes the causes and solutions of the problem, through this article I hope you can solve this problem.
1. First set the root password, log in to Ubuntu using the existing administrator account, execute the command sudo passwd root on the terminal, then enter the password and root password, and repeat the password. This will give you root users.
2. By default, it is not allowed to log in to the GUI directly with the root account. This can be done by modifying the vi /etc/lightdm/lightdm.conf file to allow root to log in directly
Add greeter-show-manual-login=true allow-guest=false . The entire modified configuration file is
[SeatDefaults]
greeter-session=unity-greeter
user-session=ubuntu
greeter-show-manual-login=true #Manually enter the login username and password
allow-guest=false #guest logins are not allowed
Restart ubuntu, login window will have "login" option, then we can log in through root.
If the above method still cannot be solved, then follow the following method:
Modify the/etc/pam.d/login file:
The code is as follows:
gedit /etc/pam.d/login
find
The code is as follows:
auth [success=ok new_authtok_reqd=ok ignore=ignore user_unknown=bad default=die] pam_securetty.so
Modify to read as follows:
The code is as follows:
auth requisite pam_securetty.so
After doing the above, restart the computer. At this point, the root user can log in to the computer.
After reading the above, do you know how to set root login in ubuntu? If you still want to learn more skills or want to know more related content, welcome to pay attention to the industry information channel, thank you for reading!