- Lab
- A Cloud Guru
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.
Path Info
Table of Contents
-
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. -
Challenge
Use /etc/issue.net to Present a Message to Users Logging In Remotely Based on the Instructions Provided
- 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]." - Update the Banner path in
/etc/ssh/sshd_confi
to point to/etc/issue.net
, and restart the sshd service. - Test the change by attempting an additional login to the host.
- Use a text editor to add the following text to
-
Challenge
Use /etc/motd to Present a Message to Users Who Have Successfully Logged In Based on the Instructions Provided
-
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]"
-
Validate the change by logging into the host.
-
-
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
- Send a wall message using the text file
maintenance.txt
in/home/cloud_user
(suppress the banner message). - Using the
shutdown
command, schedule a power-off of the system to take in 4 hours of the current time. - Cancel the shutdown (optional).
- Send a wall message using the text file
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.