System Administration Guide: Advanced Administration

ProcedureHow to Set Up a Message-Of-The-Day

Edit the message-of-the-day file, /etc/motd, to include announcements or inquiries to all users of a system when they log in. Use this feature sparingly, and edit this file regularly to remove obsolete messages.

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Edit the /etc/motd file and add a message of your choice.

    Edit the text to include the message that will be displayed during user login. Include spaces, tabs, and carriage returns.

  3. Verify the changes by displaying the contents of the /etc/motd file.


    $ cat /etc/motd
    Welcome to the UNIX Universe. Have a nice day.

Example 5–11 Setting Up a Message-Of-The-Day

The default message-of-the-day, which is provided when you install Oracle Solaris software, contains version information.


$ cat /etc/motd
Sun Microsystems Inc.   SunOS 5.10       Generic  May 2004

The following example shows an edited /etc/motd file that provides information about system availability to each user who logs in.


$ cat /etc/motd
The system will be down from 7:00 a.m to 2:00 p.m. on
Saturday, July 7, for upgrades and maintenance.
Do not try to access the system during those hours.
Thank you.