Ubuntu18.04 is how to obtain the root account, the root unlock

In the Linux system root privileges it is very important, in many places it is impossible that you do not have permission to make changes. So here I will teach you how to get root in Ununtu in.

1. First create a root user, open a terminal and enter the command sudo passwd root

This time it will let you enter the current password for the account, the next step is the pop-up is to set the root password, it will let you enter it again to confirm, the password to remember

2. modify the configuration file, the file path of the file path /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf

We directly use the Open command, you can use an editor like vim, enter

gedit /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf

We need to enter at the end of

greeter-show-manual-login = true

all-guest = false

3. Remove gdm login user testing, modification /etc/pam.d/gdm-autologin file

Enter the command gedit /etc/pam.d/gdm-autologin

Delete the contents or comment below, with the comment symbol #

auth required pam_succeed_if.so user != root quiet_success

4. Modify /etc/pam.d/gdm-password file,

gedit /etc/pam.d/gdm-password same delete or comment out the above statement

5. Modify /root/.profile

gedit /root/.profile

The last line of the document before mesg n || true added tty -s && That tty -s && mesg n || true

6. restart the system, the terminal interface input #reboot

After the reboot is complete, the login screen select the "unlisted", then enter the user name root can log in

 

 

 

 

 

 

 

Published 12 original articles · won praise 0 · Views 272

Guess you like

Origin blog.csdn.net/weixin_45488363/article/details/105139444