How to set the login with the root permission in ubuntu

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.