Message of the day
A message of the day (MOTD) is a short text file or dynamically generated message displayed to users immediately after successful login to a computer system, serving as a system-wide announcement mechanism in Unix-like operating systems.[1] Traditionally stored in the/etc/motd file, it conveys essential information such as system maintenance schedules, security alerts, usage policies, or welcome notices to all users without requiring individual emails or notifications, thereby conserving resources.[1][2]
Originating as a longstanding feature in Unix systems since at least the early days of multi-user computing, the MOTD provides administrators with an efficient way to broadcast updates upon user sessions.[1] In modern distributions like Ubuntu and Debian, it has evolved to support dynamic generation through scripts in /etc/update-motd.d/, allowing real-time data such as system load, disk usage, or uptime to be included automatically.[3] Beyond core operating systems, the concept has been adopted in online multiplayer games, chat servers, and bulletin board systems, where it informs users of server news, events, or rules upon connection.[4]
The MOTD's simplicity and immediacy make it a persistent tool for user communication, though its content must be managed carefully to avoid overwhelming users or exposing sensitive details.[2] In security contexts, unauthorized modifications to MOTD files can indicate persistence techniques by attackers, highlighting its role in system monitoring.[5]
History
Origins
The concept of displaying system messages upon login originated in time-sharing systems of the 1960s, notably Multics, a collaborative project between MIT, Bell Labs, and General Electric. In Multics, the system responded to user connections by sending a greeting message to the terminal station after baud rate detection or dial-up activation, facilitating initial user interaction and providing essential access information before the login prompt.[6] This practice influenced subsequent operating systems, emphasizing the importance of immediate post-connection communication in multi-user environments. The Message of the Day (MOTD) feature emerged in early Unix development at Bell Labs during the late 1960s and early 1970s, as part of the foundational login processes crafted by Ken Thompson and Dennis Ritchie. Unix, initially prototyped on a PDP-7 in 1969, incorporated a login mechanism where the init process managed terminal sessions, prompting users for credentials and transitioning to the shell upon validation. The /etc/motd file, serving as a centralized repository for such messages, likely predated Unix Version 1 (released in 1971), enabling administrators to post updates like new software installations or hardware changes, which users encountered once or twice daily via dial-in terminals or shared rooms.[7] By Version 7 Unix in 1979, the /etc/motd file had become a standardized component, explicitly documented for displaying a daily message to all logging-in users, often used for critical notices such as impending system shutdowns.[8] First deployed in Bell Labs' academic and research environment, it supported collaborative computing among developers working irregular hours, ensuring efficient dissemination of operational information without interrupting active sessions.[9]Evolution
Following its establishment in early Unix systems, the Message of the Day (MOTD) feature expanded during the 1980s and 1990s through variants of Berkeley Software Distribution (BSD) Unix, where the /etc/motd file was used for displaying system-wide announcements upon login. This period saw widespread adoption in BSD releases such as 4.3BSD (1986), which integrated MOTD into login processes for multi-user environments, enhancing administrative communication across networked academic and research systems. By the early 1990s, Linux distributions incorporated the MOTD tradition starting with initial releases like Slackware (1993) and Debian (1993), preserving the /etc/motd mechanism in their login utilities to support growing open-source server deployments.[1] The concept extended beyond Unix-like systems in the 1990s, appearing in non-Unix environments such as Windows NT 3.1 (released in 1993), where logon scripts enabled administrators to display custom messages during user authentication, akin to MOTD functionality for domain-joined workstations and servers.[10] Similarly, mainframe systems like IBM z/OS adopted equivalent features through configurable login banners and messages in the early 2000s, allowing operators to broadcast updates on system status or policies during TSO/ISPF sessions, a practice rooted in the era's emphasis on centralized computing security and notifications.[11] In the 2000s, the rise of internet connectivity propelled MOTD into networked protocols, particularly with the release of OpenSSH in 1999, which included the PrintMotd directive in its server configuration to automatically display /etc/motd content after successful SSH logins, facilitating remote administration in distributed environments. This integration supported the proliferation of secure remote access tools, where MOTD served as a lightweight method for conveying security warnings or maintenance schedules without additional overhead. Post-2010 developments integrated MOTD with modern infrastructures, including cloud platforms like AWS EC2, where Amazon Linux distributions display dynamic MOTD content upon instance login to provide instance-specific details such as kernel version and uptime. In containerization, Docker entrypoints commonly invoke /etc/motd or equivalent scripts to output welcome messages or configuration summaries when entering interactive shells, adapting the feature for ephemeral, orchestrated workloads in microservices architectures.Technical Implementation
Unix-like Systems
In Unix-like systems, the message of the day (MOTD) is typically stored in a plain text file located at/etc/motd, which contains arbitrary messages intended for display to users upon login.[1] This file is read and output by the login(1) program immediately after successful user authentication but before the user's shell is invoked, ensuring the message appears consistently across terminal logins.[12] The getty process, which manages the initial login prompt on virtual consoles, does not directly handle MOTD display; instead, it transitions control to login(1) for post-authentication actions.[13] The MOTD supports multi-line content and basic special characters, though it must remain as unformatted text to avoid rendering issues in terminal displays.[1]
To configure a static MOTD, system administrators edit the /etc/motd file using a text editor such as vi or nano.[14] For security, the file should be owned by root:root with permissions set to 644 (readable by all, writable only by root), preventing unauthorized modifications while allowing broad visibility.[15] These changes take effect automatically on the next login, as the system displays the file's contents verbatim without requiring restarts or additional services.[16]
Modern distributions like Ubuntu and Debian support dynamic MOTD generation through the Pluggable Authentication Modules (PAM) framework, specifically the pam_motd module configured in files such as /etc/pam.d/sshd or /etc/pam.d/[login](/page/Login). This module executes executable scripts in the /etc/update-motd.d/ directory in numerical order during login, concatenating their output into a temporary file like /run/motd.dynamic for display.[17] Administrators can create custom scripts here—for instance, one to report system uptime via uptime or disk usage via df—enabling real-time information without manual file updates.[18]
Static MOTD examples often include essential system status notifications, such as current uptime and load averages (e.g., "System uptime: 5 days, load average: 0.12 0.34 0.56"), or legal disclaimers like warnings against unauthorized access.[19] For dynamic cases, scripts might generate content like user-specific greetings or security alerts, with multi-line output preserved through proper newline handling in the scripts.[14] This approach originated in early Unix systems as a simple broadcast mechanism but has evolved to support scripted dynamism in contemporary environments.[1]
Other Operating Systems
In Microsoft Windows, the equivalent of a message of the day is provided through the interactive logon message feature, which displays a customizable notice to users before authentication during the login process. This is primarily configured using Group Policy settings, specifically "Interactive logon: Message text for users attempting to log on" for the message body and "Interactive logon: Message title for users attempting to log on" for the header, applicable in domain environments for centralized management across multiple systems.[20][21] These policies modify the registry keys atHKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, where LegalNoticeText holds the message content and LegalNoticeCaption holds the title, differing from Unix file-based approaches by relying on registry and policy-driven persistence.[22]
For dynamic content in Windows, administrators can employ PowerShell scripts to query system information—such as uptime, updates, or resource usage—and programmatically update the LegalNoticeText registry value, enabling real-time customization not natively supported in the static policy configuration.[22][23]
In macOS, which is based on the Darwin kernel with BSD heritage, the MOTD functions similarly to Unix-like systems via the /etc/motd file, displayed automatically by the login process (such as in Terminal.app) for interactive login shells before the shell prompt appears.[24] User-specific variants can be achieved by appending content through shell configuration files like .bash_profile or by scheduling updates with launchd daemons to generate dynamic messages based on system events, providing flexibility beyond the global static file.[25]
On mainframe systems like IBM z/OS, MOTD-like functionality is integrated into Time Sharing Option/Extensions (TSO/E) logon procedures, which execute upon user login and can display customized welcome panels, broadcast messages, or system announcements before the interactive session begins.[26] The MSGCLASS parameter in these procedures specifies the output class for routing job logs and messages, allowing administrators to control visibility and delivery of login-related notifications in a manner tailored to enterprise batch and interactive workloads.[27]
Cross-platform tools such as OpenSSH facilitate MOTD display across diverse operating systems, including Windows, macOS, and non-Unix environments, by configuring the PrintMotd yes option in sshd_config to show /etc/motd (or equivalent) after successful authentication, while the Banner directive enables a pre-authentication warning message from a specified file, ensuring consistent behavior independent of the host OS.[28] This approach contrasts with native OS methods by emphasizing secure remote access protocols over local console displays.
Applications
System Administration
In system administration, the message of the day (MOTD) serves as a vital tool for disseminating critical operational information to users upon login, enabling efficient communication across IT infrastructures. Administrators commonly leverage MOTD to announce scheduled maintenance windows, such as server reboots or network upgrades, ensuring users can plan accordingly and minimize disruptions. For instance, scripted MOTD implementations can dynamically display resource usage metrics, like disk quotas or CPU load averages, helping users monitor their allocations in real-time and prevent overutilization. Security updates, including patch notifications or vulnerability alerts, are also frequently conveyed through MOTD to promote prompt awareness and compliance with organizational policies. Customization of MOTD varies significantly between enterprise and personal server environments to align with specific needs and user bases. Personal servers, by contrast, may feature engaging elements such as ASCII art banners to personalize the login experience and foster a sense of community among hobbyist users. These adaptations ensure the MOTD remains relevant and accessible, enhancing user interaction without compromising functionality. Best practices in MOTD management emphasize brevity and security to maintain its effectiveness as a communication channel. Messages should be kept concise to avoid overwhelming users and ensure key details are quickly absorbed. Administrators must avoid including sensitive data, such as internal IP addresses or authentication credentials, to mitigate risks of information leakage in shared environments. Automation is recommended for updates, with tools like cron jobs enabling scheduled refreshes of MOTD content based on system events, thereby reducing manual intervention and ensuring timeliness. These applications demonstrate MOTD's role in streamlining administrative workflows and reinforcing operational governance.Online Gaming
In online gaming, the Message of the Day (MOTD) is a customizable server-side message displayed to players upon connecting to a multiplayer game server or appearing in server listings. This feature, inspired by traditional system login messages, serves as an initial point of communication between the server and players. In games like Minecraft, the MOTD is configured in theserver.properties file and shown below the server name in the multiplayer menu, allowing administrators to set a static text string up to two lines long that supports color and formatting codes.[29]
The primary purposes of MOTD in gaming include announcing server rules, displaying current player counts, highlighting events or promotions, and providing branding or welcoming information to foster community engagement. For instance, Minecraft servers often use MOTD to advertise custom gameplay modes or ongoing events, such as "\u00A7cSurvival \u00A7a| \u00A7b20 Players Online \u00A7eJoin Now!", which helps attract players in the server browser. In Counter-Strike: Source and Global Offensive, the MOTD appears as a panel or HTML-formatted page upon connection, commonly used to outline rules, anti-cheat policies, or sponsor promotions, enhancing server identity in competitive lobbies. Similarly, in World of Warcraft, guild MOTDs are broadcast to members upon login, informing them of raid schedules, recruitment needs, or community updates, which supports guild coordination in realm-based play.[29][30][31]
Technical implementation of MOTD varies by game engine and server software, often involving simple text files or plugins for advanced features. In the Source engine, powering titles like Counter-Strike, MOTD is defined in a motd.txt file that supports basic HTML for images, links, and styling, enabling visually rich displays without requiring restarts. For Minecraft servers using the Bukkit API, plugins like MiniMOTD allow dynamic generation of MOTDs based on server status, incorporating RGB gradients, placeholders for player data, and hyperlinks to external sites, all configurable via YAML files. Unity-based multiplayer games, such as those built with Mirror or Photon networking, typically implement MOTD through custom server scripts that query databases for real-time content, though specifics depend on the game's architecture. These setups prioritize ease of customization to maintain player interest without disrupting gameplay.[32][33]
In the evolution of esports since the 2010s, MOTD has adapted for competitive use in tournament servers, providing live updates like match brackets, team rosters, and integrated statistics to players and casters. For example, in Counter-Strike: Global Offensive events, dedicated servers employ MOTD panels to display tournament-specific rules and sponsor banners, streamlining event communication as esports viewership grew from millions to tens of millions annually. This integration reflects broader trends in professional gaming infrastructure, where dynamic MOTD elements via plugins or APIs enhance real-time engagement during high-stakes matches.[30][34]