You can easily use /etc/issue file to display a pre-login message / login warning banner for text based session. You can also force OpenSSH (SSHD) to display a login message or banner. But how do you force GDM to display a login banner for all local and remote users?
GDM customization
GDM is a replacement for XDM, the X Display Manager. GDM runs and manages the X servers for both local and remote logins (using XDMCP). You can easily configure GDM to display message. You need to open gdm custom configuration file:
[a] RHEL / CentOS / Fedora Linux : Open /etc/gdm/custom.conf file.
[b] Debian / Ubuntu Linux : Open /etc/gdm/gdm.conf-custom file.
This file is the appropriate place for specifying your customizations to the GDM configuration. If you run gdmsetup, it will automatically edit this file for you and will cause the daemon and any running GDM GUI programs to automatically update with the new configuration. Not all configuration options are supported by gdmsetup, so to modify some values it may be necessary to modify this file directly by hand.
Display a login banner for Gnome / GDM under Linux
Open /etc/gdm/custom.conf file:
# vi /etc/gdm/custom.conf
Find out [greeter] section and append following text:
DefaultWelcome=false
Welcome=Message for local users
RemoteWelcome=Message for remote login users
Save and close the file.
A note about RHEL / CentOS / Fedora user
Apart from above configuration you also need to add following line inder the [daemon] section:
Greeter=/usr/libexec/gdmlogin
Using GUI tool gdmsetup
gdmsetup is a graphical tool for easily changing the most commonly used options including greeting messages. As I mentioned earlier gdmsetup does not support changing of all onfiguration variables, so it may be necessary to edit the files by hand for some configurations and security issues. Open X terminal and enter the command:
$ sudo gdmsetup

(click to enlarge)
Select Local tab > Welcome Messages > Custom > Enter your custom message > Click on Close button to save the changes.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 4 comments… read them below or add one }
This particular article is very informative, really enjoyed going thru this document.
In the [greeter] section, it might be interesting to add the parameter
DefaultRemoteWelcome=false
in order to have a custom welcome message for remote logins too
Unfortunately gdmsetup is no longer available. Does anyone know how to implement logon banners in RHEL6.2?
Trust you were not holding your breath, Guy…
for RHEL/CentOS 6.2 do:
1) gconftool-2 –direct –config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory –type boolean –set /apps/gdm/simple-greeter/banner_message_enable 1
2) gconftool-2 –direct –config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory –type string –set /apps/gdm/simple-greeter/banner_message_text “####################################################
You have connected to a private computer system.
Access to this system, its traffic and contents
may be monitored with information disclosed to
others, including law enforcement agencies, as
deemed appropriate.
Only authorised people may access this system
using individually assigned user accounts.
Unauthorised use is prohibited by law and may
lead to prosecution.
####################################################”