How to enable the root account in Ubuntu 20.04

How to enable the root account in Ubuntu 20.04

After Ubuntu 20.04 is installed, there is no root account login permission by default. Follow the steps below to complete the root account login in one step. Do you think it is very convenient after reading this?

1. First Step

Log in to the system as a normal user and create a password for the root user

Enter the command in the terminal: sudo passwd root


Then enter the set password twice, and the root user password is set (note that the password is not echoed in Linux system)

2. Step 2

Modify the 50-ubuntu.conf file

Enter the command in the terminal: sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf


Add the following two lines to the end of the file:

greeter-show-manual-login=true
all-guest=false 

3. Step 3

Modify the gdm-autologin file

Enter the command in the terminal: sudo gedit /etc/pam.d/gdm-autologin to open the file


Add # in front to comment out the third line auth required pam_succeed_if.so user != root quiet_success

4. Step 4

Modify the gdm-password file

Enter the command in the terminal: sudo gedit /etc/pam.d/gdm-password to open the file


Add # in front to comment out the third line auth required pam_succeed_if.so user != root quiet_success

5. Step 5

Modify the /root/.profile file

Enter the command in the terminal: sudo gedit /root/.profile to open the file


Change the line mesg n 2> /dev/null || true at the end of the file to
tty -s&&mesg n || true

6. Final Step

Please log out and log in again.

Select Not Listed?
Then enter root and the password you set previously to log in successfully

Click to get reference source

The next article will share with you how to copy and paste text from the Windows operating system to the Linux system under VMware virtual machine

This is the end of this article about the steps to enable the root account in Ubuntu 20.04. For more information about enabling the root account in Ubuntu 20.04, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed tutorial on how to log in to the system using the root user in the new version of Ubuntu 20.04
  • Ubuntu 20.04 desktop installation and root permission activation and ssh installation details

<<:  The scroll bar position is retained when scrolling the vant list component

>>:  Two ways to configure Vue global methods

Recommend

Detailed explanation of the two modes of Router routing in Vue: hash and history

hash mode (default) Working principle: Monitor th...

JavaScript uses setTimeout to achieve countdown effect

In order to enhance the ability to write JavaScri...

Detailed explanation of how to configure Nginx web server sample code

Overview Today we will mainly share how to config...

Solution to the impact of empty paths on page performance

A few days ago, I saw a post shared by Yu Bo on G...

Introducing icons by implementing custom components based on Vue

Preface In project development, there are many wa...

An article to quickly understand Angular and Ionic life cycle and hook functions

Table of contents Angular accomplish Calling orde...

Research on the problem of flip navigation with tilted mouse

In this article, we will analyze the production of...

How to generate a free certificate using openssl

1: What is openssl? What is its function? What is...

How to add rounded borders to div elements

As shown below: CSS CodeCopy content to clipboard...

MYSQL subquery and nested query optimization example analysis

Check the top 100 highest scores in game history ...

Detailed explanation of three ways to wrap text in el-table header

Table of contents Problem Description Rendering T...

How to install Graphviz and get started tutorial under Windows

Download and installConfigure environment variabl...

Explanation of building graph database neo4j in Linux environment

Neo4j (one of the Nosql) is a high-performance gr...

Introduction to several ways to introduce CSS in HTML

Table of contents 1. Embed CSS styles directly in...