Ubuntu notes ----- use root to log on

Source: Internet
Author: User
By default, Ubuntu does not allow users to log on to the Ubuntu system as root. you can find the following methods on the Internet: 1. first

Use root to log on to 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,

AddGreeter-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 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:

Gedit/etc/pam. d/login

Find

Auth [success = OK new_authtok_reqd = OK ignore = ignore user_unknown = bad default = die] pam_securetty.so

Modify it to the following content:

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.