ubantu19.04 configuration on the root user login

The first step:
a normal user login system, create the root password
to enter commands in a terminal: sudo passwd root
and then enter the password set, thus completing the steps to set up the root user password

Step two:
modify the file sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
increase at the end of the file the following two lines:

Show-Manual--Greeter Login to true =
All = Guest-to false
. 1
2
Step:
Review /etc/pam.d/gdm-autologin
and files /etc/pam.d/gdm-password

sudo gedit /etc/pam.d/gdm-autologin
commented auth required pam_succeed_if.so user! = (about the third line) root quiet_success this line

sudo gedit /etc/pam.d/gdm-password
commented auth required pam_succeed_if.so user! = root quiet_success ( about the third line) the line

Step Four: Modify /root/.profile file
sudo gedit /root/.profile
the end of the file mesg n || true this line is modified to
tty -s && mesg n || true

Step five:
sudo gedit / etc / SSH / sshd_config
in #PermitRootLogin prohibit-password
under Add: PermitRootLogin yes

Fifth step:
reboot the system
---------

Note: The fifth step sshd_config is empty, you can simply ignore the fifth step.

Guess you like

Origin www.cnblogs.com/wangqianpeng/p/11414460.html