How to change the message of the day (motd) on Red Hat Enterprise Linux?
Environment
- Red Hat Enterprise Linux
Issue
- How to change the message of the day (motd) on Red Hat Enterprise Linux?
Resolution
The message of the day can be used to communicate information to end users, the contents of /etc/motd
are displayed after a successful login but just before it executes the login shell.
- You can change the current message by editing the file
/etc/motd
using a text editor such asvi
orvim
# vi /etc/motd
This is a test message and it will be shown every time a user logs on.
- After every new login to the system the message will be spawned. Here is a example below:
Last login: Wed Sep 26 13:47:27 2012
This is a test message and it will be shown every time a user logs on.
- For more information on Login Banners see article: How to configure a Login Banner or Splash Screen in Red Hat Enterprise Linux
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
3 Comments
Most if not all systems within the last few decades (snark) use graphical login of some kind (xdm, gdm, kde). Text based MOTD behavior does not really seem to work in these cases. Something more helpful would be to explain GDM/MOTD Splash Window Behavior. I have seen it on many systems, just can't figure out how to make it so. These RH articles on MOTD should be more helpful and explain this ... still looking.
How can i set a dynamic message in motd for example: The result of the command uname -r
Same question as haglo above. This "article" has little value. Please add examples.