centos change settings default to root user

1 The following method is OK, it is recommended to

[root@localhost ~]$ cd /etc


[root@localhost etc]$ vim passwd


After entering the command, you can see in the last line of the passwd file: angie:x:1001:1001:angie: /home/angie:/bin/bash, (my username is Jack)
change angie:x:1001:1001:angie:/home/angie:/bin/bash to angie:x:0:1001:angie: /home/angie:/bin/bash, save and reboot.

If you don't have permission to save it, you can first su to get root permission and then change it~


2 Supplement: (No experiment is successful, or the above method is reliable)

from : http://www.cnblogs.com/lixd/p/3869168.html

CentOS7.0 uses root to log in to the desktop. The

new version 7.0 does not have a lot of information. For security, Linux prohibits root login to the desktop, but for convenience, I want to use root to log in to the desktop. I found it online, basically this article :

http://shaoguangleo.blog.163.com/blog/static/227798320121022270901/

But in 7.0 there is no "/etc/pam.d/gdm" file, nor #auth required pam_succeed_if.so user != The line root quiet can be corrected.

In fact, implementation method is very simple.

1. Edit /etc/gdm/custom.conf and modify the following two lines:

AutomaticLoginEnable=true This is changed to true
AutomaticLogin=root This is changed to root

2. When logging in to the desktop, do not directly click on the user name, but select "not list ", then enter root, enter the password to enter.



Supplement:

If the desktop display is still in English, if it is on the virtual machine, move the lower position and restart it.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326445039&siteId=291194637