Question: How to set the banner shown as part of a console in CentOS/RHEL 8?
GNOME console banner is a screen with a certain message that is shown before any user logins into the system using his/her login credentials. Login is performed by the Gnome Display Manager (GDM) tool. The steps to configure the GNOME login screen banner are outlined below. All steps are performed as the root user.
1. Create the GDM profile (if it doesn’t exist) in /etc/dconf/profile/gdm which contains the following lines:
# vi /etc/dconf/profile/gdm user-db:user system-db:gdm file-db:/usr/share/gdm/greeter-dconf-defaults
Here, GDM is the name of a dconf database.
2. Create a GDM database for machine-wide settings in /etc/dconf/db/gdm.d/01-banner-message. You may have to create the directory /etc/dconf/db/gdm.d if its not already present.
# vi /etc/dconf/db/gdm.d/01-banner-message [org/gnome/login-screen] banner-message-enable=true banner-message-text='Type the banner message here'
In our case, lets have the banner message as follows:
This is geeklab system. Only geeks are allowed to login
3. Update the system databases:
# dconf update
If the banner message does not show, make sure you have run the dconf update command. In case the banner message does not update, try restarting gdm.
4. Logout and login again to view the new GNOME login banner. Voila, here is our new GNOME login banner.