{"id":217,"date":"2016-07-07T05:12:57","date_gmt":"2016-07-07T05:12:57","guid":{"rendered":"http:\/\/symbioticindia.in\/docu\/?p=217"},"modified":"2016-07-07T05:12:57","modified_gmt":"2016-07-07T05:12:57","slug":"banner-in-cetos-or-any-linux-flavour","status":"publish","type":"post","link":"http:\/\/symbioticindia.in\/docu\/2016\/07\/07\/banner-in-cetos-or-any-linux-flavour\/","title":{"rendered":"Banner in CetOS or any linux Flavour"},"content":{"rendered":"<h1 id=\"head-d23491fab5d6e51d8aad9f0dea34562441d8a03f\">Banner Files<\/h1>\n<p class=\"line874\">or say hello to the user that log in and NO to unauthorized users.<span id=\"line-4\" class=\"anchor\"><\/span><span id=\"line-5\" class=\"anchor\"><\/span><\/p>\n<p class=\"line874\">Author: matsk<span id=\"line-6\" class=\"anchor\"><\/span><span id=\"line-7\" class=\"anchor\"><\/span><\/p>\n<p class=\"line874\">Final: 2009-02-10<span id=\"line-8\" class=\"anchor\"><\/span><span id=\"line-9\" class=\"anchor\"><\/span><\/p>\n<p class=\"line874\">Send improvements, corrections and comments to the CentOS-docs mailinglist.<span id=\"line-10\" class=\"anchor\"><\/span><span id=\"line-11\" class=\"anchor\"><\/span><\/p>\n<h2 id=\"head-1b5c71940cc302c65c2f21c1b485703a37471309\">Introduction<\/h2>\n<p class=\"line862\">This Tips &amp; Trix will cover banners for SSH and the console prompt.<span id=\"line-13\" class=\"anchor\"><\/span><span id=\"line-14\" class=\"anchor\"><\/span><\/p>\n<h2 id=\"head-c55bf51ed28825be6c043b137a2c6d3d7eb9610e\">About legal issues<\/h2>\n<p class=\"line874\">An often forgotten area in system protection is an well formed banner text.<span id=\"line-16\" class=\"anchor\"><\/span><span id=\"line-17\" class=\"anchor\"><\/span><\/p>\n<p class=\"line862\">Since the publication of the <a class=\"http\" href=\"http:\/\/www.legislation.hmso.gov.uk\/acts\/acts1990\/Ukpga_19900018_en_1.htm\">&#8220;Computer Misuse Act 1990&#8221;<\/a> it has been strongly recommended that computers display a banner before allowing users to log in. The Act stipulates that an offense of unauthorized access can only be committed if the offender knew at the time that the access he intended to obtain was unauthorized. Login banners are the best way to achieve this. The <a class=\"http\" href=\"http:\/\/www.legislation.hmso.gov.uk\/acts\/acts2000\/20000023.htm\">&#8220;Regulation of Investigatory Powers Act 2000&#8221;<\/a> also requires information to be given to computer users: login banners may also be a good way to do this dissemination.<span id=\"line-18\" class=\"anchor\"><\/span><span id=\"line-19\" class=\"anchor\"><\/span><\/p>\n<h2 id=\"head-3bdbe65028736f03d7a724b89aa6bb4cf5aba93c\">\/etc\/motd<\/h2>\n<p class=\"line867\"><em>Console login<\/em> The content of this file is shown after the user has logged in, and immediately before the shell is started.<span id=\"line-21\" class=\"anchor\"><\/span><span id=\"line-22\" class=\"anchor\"><\/span><\/p>\n<h2 id=\"head-7a03d6fcd3bb79f062a05f28ff1cb6f2682e1d5b\">\/etc\/issue.net<\/h2>\n<p class=\"line867\"><em>Network login<\/em><span id=\"line-24\" class=\"anchor\"><\/span><span id=\"line-25\" class=\"anchor\"><\/span><\/p>\n<p class=\"line867\"><strong>OBS<\/strong> By default is this disabled in ssh!<span id=\"line-26\" class=\"anchor\"><\/span><span id=\"line-27\" class=\"anchor\"><\/span><\/p>\n<p class=\"line874\">The content of this file is shown when a ssh session is connected and before the authorization.<span id=\"line-28\" class=\"anchor\"><\/span><span id=\"line-29\" class=\"anchor\"><\/span><\/p>\n<p class=\"line874\">To enable this in ssh you have to follow this simple steps:<span id=\"line-30\" class=\"anchor\"><\/span><span id=\"line-31\" class=\"anchor\"><\/span><\/p>\n<p class=\"line874\">1. Create a \/etc\/issue.net file and fill it with the desired context<span id=\"line-32\" class=\"anchor\"><\/span><span id=\"line-33\" class=\"anchor\"><\/span><\/p>\n<p class=\"line862\">2. Edit \/etc\/ssh\/sshd_config, to look like this <tt>Banner\u00a0\/etc\/issue.net<\/tt><span id=\"line-34\" class=\"anchor\"><\/span><span id=\"line-35\" class=\"anchor\"><\/span><\/p>\n<p class=\"line862\">3. Restart sshd, <tt>service\u00a0sshd\u00a0restart<\/tt><span id=\"line-36\" class=\"anchor\"><\/span><span id=\"line-37\" class=\"anchor\"><\/span><\/p>\n<h2 id=\"head-a39790c6210aca5ac1d967751b94d1c63535cc34\">FTP Greeting Banner<\/h2>\n<p class=\"line874\">This topic is covered in the &#8220;Deployment Guide&#8221; for CentOS 5.1 in section 43.2.6.1. &#8220;FTP Greeting Banner&#8221;<span id=\"line-39\" class=\"anchor\"><\/span><span id=\"line-40\" class=\"anchor\"><\/span><\/p>\n<ul>\n<li>\n<p class=\"line862\">[javascript:void(0);\/*1234255103621*\/ <a class=\"http\" href=\"http:\/\/www.centos.org\/docs\/5\/html\/5.1\/Deployment_Guide\/s2-server-ftp-gbanner.html\">http:\/\/www.centos.org\/docs\/5\/html\/5.1\/Deployment_Guide\/s2-server-ftp-gbanner.html<\/a>]<span id=\"line-41\" class=\"anchor\"><\/span><\/p>\n<\/li>\n<\/ul>\n<h2 id=\"head-81d0e40dd95f0014a7a788c367b57c16c2eec640\">TCP Wrappers and Connection Banners<\/h2>\n<p class=\"line874\">This topic is covered in the Deployment Guide&#8221; for CentOS 5.1 in section 43.2.1.1.1. &#8220;TCP Wrappers and Connection Banners&#8221;<span id=\"line-43\" class=\"anchor\"><\/span><span id=\"line-44\" class=\"anchor\"><\/span><\/p>\n<ul>\n<li>\n<p class=\"line862\">[javascript:void(0);\/*1234255117465*\/ <a class=\"http\" href=\"http:\/\/www.centos.org\/docs\/5\/html\/5.1\/Deployment_Guide\/s3-server-tcp-banner.html\">http:\/\/www.centos.org\/docs\/5\/html\/5.1\/Deployment_Guide\/s3-server-tcp-banner.html<\/a>]<span id=\"line-45\" class=\"anchor\"><\/span><\/p>\n<\/li>\n<\/ul>\n<h2 id=\"head-7e88e89bb32417f9dbfe67cf9611cfb0ea5c0c29\">Sample banner texts<\/h2>\n<h3 id=\"head-3ff0ec2aa70721f3bdeab76014dc2d8712cc8813\">Example #1<\/h3>\n<pre>Unauthorized access to this machine is prohibited\r\n<span id=\"line-49\" class=\"anchor\"><\/span>Press &lt;Ctrl-D&gt; if you are not an authorized user<\/pre>\n<h3 id=\"head-0bc39c9a0d96b5f07eecf3f5e9d00064b50809b8\">Example #2<\/h3>\n<pre>********************************************************************\r\n<span id=\"line-53\" class=\"anchor\"><\/span>*                                                                  *\r\n<span id=\"line-54\" class=\"anchor\"><\/span>* This system is for the use of authorized users only.  Usage of   *\r\n<span id=\"line-55\" class=\"anchor\"><\/span>* this system may be monitored and recorded by system personnel.   *\r\n<span id=\"line-56\" class=\"anchor\"><\/span>*                                                                  *\r\n<span id=\"line-57\" class=\"anchor\"><\/span>* Anyone using this system expressly consents to such monitoring   *\r\n<span id=\"line-58\" class=\"anchor\"><\/span>* and is advised that if such monitoring reveals possible          *\r\n<span id=\"line-59\" class=\"anchor\"><\/span>* evidence of criminal activity, system personnel may provide the  *\r\n<span id=\"line-60\" class=\"anchor\"><\/span>* evidence from such monitoring to law enforcement officials.      *\r\n<span id=\"line-61\" class=\"anchor\"><\/span>*                                                                  *\r\n<span id=\"line-62\" class=\"anchor\"><\/span>********************************************************************<\/pre>\n<h2 id=\"head-a857e5616e310e045ff3a5cb973aa36177152f16\">Fancy banners<\/h2>\n<h3 id=\"head-c2a820e78d9339b713dffcae6cbafe19f4181128\">linux_logo<\/h3>\n<p class=\"line867\"><a class=\"http\" href=\"http:\/\/www.deater.net\/weave\/vmwprod\/linux_logo\/\">&#8220;Create nice ASCII Art logos&#8221;<\/a><span id=\"line-66\" class=\"anchor\"><\/span><span id=\"line-67\" class=\"anchor\"><\/span><\/p>\n<p class=\"line874\">linux_logon is a tool that creates ASCII Art banners. The default ASCII art can be seen in the example below or other created from a template file. It does also add system stats like kernel version, CPU version, RAM and utilization values.<span id=\"line-68\" class=\"anchor\"><\/span><span id=\"line-69\" class=\"anchor\"><\/span><\/p>\n<p class=\"line867\"><strong>Example<\/strong><span id=\"line-70\" class=\"anchor\"><\/span><span id=\"line-71\" class=\"anchor\"><\/span><\/p>\n<pre>                                                                 #####\r\n<span id=\"line-73\" class=\"anchor\"><\/span>                                                                #######\r\n<span id=\"line-74\" class=\"anchor\"><\/span>                   @                                            ##O#O##\r\n<span id=\"line-75\" class=\"anchor\"><\/span>  ######          @@#                                           #VVVVV#\r\n<span id=\"line-76\" class=\"anchor\"><\/span>    ##             #                                          ##  VVV  ##\r\n<span id=\"line-77\" class=\"anchor\"><\/span>    ##         @@@   ### ####   ###    ###  ##### ######     #          ##\r\n<span id=\"line-78\" class=\"anchor\"><\/span>    ##        @  @#   ###    ##  ##     ##    ###  ##       #            ##\r\n<span id=\"line-79\" class=\"anchor\"><\/span>    ##       @   @#   ##     ##  ##     ##      ###         #            ###\r\n<span id=\"line-80\" class=\"anchor\"><\/span>    ##          @@#   ##     ##  ##     ##      ###        QQ#           ##Q\r\n<span id=\"line-81\" class=\"anchor\"><\/span>    ##       # @@#    ##     ##  ##     ##     ## ##     QQQQQQ#       #QQQQQQ\r\n<span id=\"line-82\" class=\"anchor\"><\/span>    ##      ## @@# #  ##     ##  ###   ###    ##   ##    QQQQQQQ#     #QQQQQQQ\r\n<span id=\"line-83\" class=\"anchor\"><\/span>  ############  ###  ####   ####   #### ### ##### ######   QQQQQ#######QQQQQ\r\n<span id=\"line-84\" class=\"anchor\"><\/span> Linux Version 2.6.18-53.1.4.el5, Compiled #1 SMP Fri Nov 30 00:45:16 EST 2007\r\n<span id=\"line-85\" class=\"anchor\"><\/span>One 2.19GHz AMD AMD Turion(tm) 64 Mobile ML-40 Processor, 256M RAM, 4394.20 Bogomips Total\r\n<span id=\"line-86\" class=\"anchor\"><\/span>                             localhost.localdomain<\/pre>\n<p class=\"line874\">An alternative to linux_logo is FIGlet.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Banner Files or say hello to the user that log in and NO to unauthorized users. Author: matsk Final: 2009-02-10 Send improvements, corrections and comments to the CentOS-docs mailinglist. Introduction This Tips &amp; Trix will cover banners for SSH and the console prompt. About legal issues An often forgotten area in system protection is an ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"http:\/\/symbioticindia.in\/docu\/2016\/07\/07\/banner-in-cetos-or-any-linux-flavour\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-217","post","type-post","status-publish","format-standard","hentry","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/comments?post=217"}],"version-history":[{"count":1,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/217\/revisions"}],"predecessor-version":[{"id":218,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/posts\/217\/revisions\/218"}],"wp:attachment":[{"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/media?parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/categories?post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/symbioticindia.in\/docu\/wp-json\/wp\/v2\/tags?post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}