Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to set up root login for Debian system

Shulou Source: shulou.com Published: 2022-06-01 15:41:39 11月13日 Update

This article mainly explains "how to set up the root login of the Debian system". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to set up the root login of the Debian system".

The Debian desktop environment does not allow root login by default, so you need to modify the configuration.

First, let Debian log in using root

1) first modify the configuration file (/ etc/gdm3/daemon.conf) of gdm3, and append the following line after the [security] field:

The code is as follows:

[security]

AllowRoot = true

2) finally modify the login pam file of gdm3:

The code is as follows:

Vi / etc/pam.d/gdm-password

Comment out auth required pam_succeed_if.so user! = root quiet_success / / add # before this line

Let Debian log in automatically as root

1) first modify the configuration file (/ etc/gdm3/daemon.conf) of gdm3, and append the following two lines after the [daemon] field:

The code is as follows:

AutomaticLoginEnable = true / / changed to true

# AutomaticLogin = root / / automatically log in as root

If you want to wait a few seconds before logging in, you can add the following to the [daemon] field:

The code is as follows:

TimedLoginEnable = true

TimedLogin = root

TimedLoginDelay = 5 / / the login delay is 5 seconds, which can be modified

2) finally, modify the automatic login pam file of gdm3:

The code is as follows:

Vi / etc/pam.d/gdm-autologin

Comment out [/ ode] auth required pam_succeed_if.so user! = root quiet_ comment [/ code]. / / add # before this line to remove the restriction that Debian does not allow root to log in.

Just restart the system!

Thank you for your reading, the above is the content of "how to set up the root login of the Debian system". After the study of this article, I believe you have a deeper understanding of how to set up the root login of the Debian system. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Login system code login file content field study line comment line that is idea situation article more desktop environment knowledge knowledge point Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft Shulou Information OPPO Reno Shulou Technology