Alwanza Home Extraordin-Air Team Final Project Linux Course Home
Statement of Problem:

Add warning messages to the system that inform users BOTH before and after they log into the machine that "Unauthorized Use Is Prohibited!"

Investigative Process:

I had seen reference to the message displayed after login in several places, and knew that it was called the "Message of the Day" and was abbreviated to "motd".  A quick check of man page for motd showed that the file exists in the /etc directory, and, if I rememeber correctly, exists, but is empty by default.  I wrote a message in this file and saved it. 

More difficult was the message to display before login.  I spent quite a lot of time Googling this issue, and the overwhelming majority of the hits mentioned the file /etc/issue as the pre-login counterpart to /etc/motd.  I examined this file - it includes a message giving the kernel version by default.  I thought I had struck gold and modified this file.  I then spent quite a long time trying to figure out why my message never displayed.  I finally got a peek at it by modifying the file on my local machine, and then rebooting it; it appears before the non-Xwindow login prompt, so if you're using X-windows to log in, you blow right past it.  I was vexed, and moved on to other things, posting an inquiry to my teamates.  The next class, Rebel mentioned that he had come across something called "banner" in his exploration of the ssh config file /etc/ssh/sshd_config.  Since we are generally logging in via ssh, this seemed a more useful modificatoin to make.  A search for "Banner" within this file led me to the crucial line.

Recipe:

The variable Banner in the file /etc/ssh/sshd_config displays the text of the file (with path) given as an argument.  This message dispays to anyone logging in via ssh.  The file can be named anything you want, and can be in any location as long as it's indicated by the path.
Banner /etc/banner.txt