CentOS 7 automatically log into gnome desktop as root

from:


http://blog.csdn.net/zdy1127/article/details/50659327 CentOS 7 automatically logs     in



to gnome desktop as root

Create a normal user, otherwise it won't let you log in.

    Restart CentOS and find that there is an option to log in with another user below, you can enter the user name to log in as root.

    Smooth and sharp operation for a while, I feel very cool XD. I want to use root to log in in the future. Anyway, it is not a server used in the production environment but a VMware virtual machine. It has a powerful snapshot function and can restore to the previous snapshot at any time. OK, let's get to the text now.

1. Configure root to automatically log in gnome

will encounter GDM when configuring:
What is GDM?

    GDM (The GNOME Display Manager) is the manager of the GNOME display environment and is used to replace the original X Display Manager. Unlike its competitors (X3DM, KDM, WDM), GDM is a complete rewrite and does not contain any XDM code. GDM can run and manage both locally and remotely logged in X servers (via XDMCP).

    gdm is just a script that actually runs GDM binary executables through it.

    gdm-stop is a script used to quickly terminate the currently running gdm daemon.

    The gdm-restart script will quickly restart the current daemon.

    gdm-safe-restart will restart when everyone is logged out.

    gdmsetup is a graphical interface tool that can easily modify most common options.

All the configuration methods found on Baidu are RHEL and CentOS 6, which are not applicable to CentOS 7. I post it here for your reference:

    In the newer version of the Linux distribution of CentOS 6, the root account is not allowed to log in to the gnome graphical user desktop by default. Therefore, after logging in, ordinary users can use su root in the terminal, Temporarily obtain root privileges;

    if you must log in to the GUI as root, you can modify /etc/pam.d/gdm and /etc/pam.d/gdm-passwd, and add the line auth required pam_succeed_if.so user != root quiet Comment out the #, and you can use the root account after saving.

For CentOS 7 users, please refer to the official help document of RedHat: 14.3.6. Configuring Automatic Login
Simply put: vi /etc/gdm/custom.conf

Then add under [daemon]:

[daemon]
AutomaticLoginEnable=True
AutomaticLogin =root #Username you want to log in automatically

Save and restart, you have logged in as root user when restarting.
2. Deleting a user To

delete a user, see: CentOS 7 User Account Configuration

For example:

userdel danyl only deletes the user, not related files and directories;

userdel -rf danyl Force delete all files and directories of user danyl, please operate with caution.

Guess you like

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