Ubuntu 20.04 does not have root login enabled by default, which is very inconvenient when we operate and configure files on the desktop. So here we teach you how to log in to the desktop directly as root, which makes the system very convenient. 1: Set the root user password Right-click on the desktop and select Open in Terminal to open the terminal emulator and execute sudo passwd root 2: Modify the configuration file 2.1: Modify 50-ubuntu.conf Execute sudo vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf and change the configuration to the following [Seat:*] user-session=ubuntu greeter-show-manual-login=true all-guest=false #This does not need to be configured 2.1: Modify gdm-autologin and gdm-password Execute sudo vim /etc/pam.d/gdm-autologin and comment out the line auth required pam_succeed_if.so user != root quiet_success (around the third line) #%PAM-1.0 auth requisite pam_nologin.so #auth required pam_succeed_if.so user != root quiet_success auth optional pam_gdm.so auth optional pam_gnome_keyring.so auth required pam_permit.so Execute sudo vim /etc/pam.d/gdm-password to comment out the line auth required pam_succeed_if.so user != root quiet_success (around the third line) #%PAM-1.0 auth requisite pam_nologin.so #auth required pam_succeed_if.so user != root quiet_success @include common-auth auth optional pam_gnome_keyring.so @include common-account 2.2: Modify the /root/.profile file Execute sudo vim/root/.profile to modify the configuration file as follows # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi tty -s && mesg n || true mesg n || true Three: Restart the system to make it take effect After restarting, the original user login selection is not listed. Log in as root user Summarize This is the end of this article about how to use the root user to log in to the system in the new version of ubuntu20.04. For more relevant content about how to use the root user to log in to the system in ubuntu20.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:
|
<<: js version to realize calculator function
>>: Detailed explanation of MySQL Truncate usage
Detailed description of media device type usage: ...
1. Background A sql-killer process is set up on e...
Friends who have used the Linux system must have ...
In MySQL, we usually use limit to complete the pa...
Table of contents 1. Preparation 2. Define the gl...
Perform the following operations in the Ubuntu co...
This article shares the installation and configur...
Table of contents 1. Basic understanding of React...
Preface This article aims to explain the most bor...
Relationship between MySQL and MariaDB MariaDB da...
Recently, I encountered many problems when instal...
1. This afternoon, due to the requirements of the...
When associating two tables, a foreign key could ...
Because the version I used when I was learning wa...
Table of contents 1. The role of index 2. Creatin...