In this article, we will discuss how to make the root user appear on the GUI login page in CentOS 8. By default, CentOS 8 hides the root user from the login screen for security reasons. However, there might be situations where you want to enable the root user account on the GUI login page. This article will guide you through the process of achieving this.
Prerequisites
Before we begin, make sure you have the following:
- A CentOS 8 system installed and set up.
- Access to the terminal with sudo privileges.
Enabling the Root User Account
By default, the root account is disabled in CentOS 8. To enable it, follow these steps:
- Open the terminal.
- Switch to the root user by typing
su -and entering the root password when prompted. - Set a password for the root user by typing
passwdand following the prompts.
Modifying the GDM Configuration File
The GUI login page is handled by the Gnome Display Manager (GDM). To make the root user appear on the login screen, you need to modify the GDM configuration file.
Before making any changes, it's a good practice to back up the original configuration file. To do so, type the following command:
sudo cp /etc/gdm/custom.conf /etc/gdm/custom.conf.bak
Now, open the configuration file using a text editor, such as nano:
sudo nano /etc/gdm/custom.conf
Add the following lines under the [daemon] section:
[daemon]
AllowRoot=true
Save and exit the file. Finally, restart the GDM service to apply the changes:
sudo systemctl restart gdm
Logging in as Root on the GUI
After completing the above steps, you should see the root user on the GUI login screen. You can now log in using the root user's credentials.
Additional Tips
- While enabling the root user on the GUI login screen might be useful in some situations, it's generally a good practice to use a non-root user for daily tasks and only use the root user when necessary.
- Make sure to secure the root user account by using a strong password and limiting access to it.
To make the root user appear on the GUI login page in CentOS 8:
- Enable the root user account and set a password.
- Modify the GDM configuration file to allow the root user.
- Restart the GDM service to apply the changes.
- Log in as root on the GUI login screen.