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

How to use dl(dt,dd), ul(li), ol(li) in HTML

HTML <dl> Tag #Definition and Usage The <...

Example code of CSS responsive layout system

Responsive layout systems are already very common...

Detailed explanation of docker visualization graphics tool portainer

Table of contents 1. Introduction to Portainer 2....

Comparative Analysis of UI Applications of Image Social Networking Sites (Figure)

In our life, work and study, social networks have ...

Detailed steps for installing and configuring MySQL 8.0 on CentOS 7.4 64-bit

Step 1: Get the MySQL YUM source Go to the MySQL ...

Mysql index types and basic usage examples

Table of contents index - General index - Unique ...

Good website copywriting and good user experience

Looking at a website is actually like evaluating a...

Detailed explanation of MySQL combined index and leftmost matching principle

Preface I have seen many articles about the leftm...

Vue realizes the sliding cross effect of the ball

This article example shares the specific code of ...

Vertical and horizontal splitting of MySQL tables

Vertical Split Vertical splitting refers to the s...

MySQL 8.0.12 installation configuration method and password change

This article records the installation and configu...