Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Creating Logon Messages to Communicate with Users in Linux

Logon messages is a great way to automate communications on a Linux system. These can be used to inform users of upcoming system maintenance and other pertinent system information. In this lab, you will be tasked with creating logon messages for local and remote logins, as well as successful logins. In addition to automated messages, you will need to communicate with active users using the wall command and schedule a shutdown of the host to be performed at a later time.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 30m
Published
Clock icon Mar 26, 2021

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Use /etc/issue to Present a Message to Users Logging In Locally Based on the Instructions Provided

    Update /etc/issue to include the name of the operating system, date, and time, and the number of current users using escape characters.

  2. Challenge

    Use /etc/issue.net to Present a Message to Users Logging In Remotely Based on the Instructions Provided

    1. Use a text editor to add the following text to /etc/issue.net: "Warning! This system is for authorized users only. To obtain access, email [email protected]."
    2. Update the Banner path in /etc/ssh/sshd_confi to point to /etc/issue.net, and restart the sshd service.
    3. Test the change by attempting an additional login to the host.
  3. Challenge

    Use /etc/motd to Present a Message to Users Who Have Successfully Logged In Based on the Instructions Provided

    1. Add the following message to /etc/motd:

      "Welcome to server01!

      - Maintenance will occur at 8:00 pm on the last friday of the month. - Local software should be installed in /opt - For elevated permissions email [email protected]"

    2. Validate the change by logging into the host.

  4. Challenge

    Notify Users of Upcoming System Maintenance and Issue a Power-off on the Host to be Performed in 4 Hours from the Current Time

    1. Send a wall message using the text file maintenance.txt in /home/cloud_user (suppress the banner message).
    2. Using the shutdown command, schedule a power-off of the system to take in 4 hours of the current time.
    3. Cancel the shutdown (optional).

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans