From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Levi Ashcol Newsgroups: gmane.os.tru64.managers Subject: [SUMMARY] How to remove OS version from telnet/ftp banner? Date: Sat, 10 Jan 2004 00:25:46 +0200 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1073687283 14237 80.91.224.253 (9 Jan 2004 22:28:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Jan 2004 22:28:03 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Fri Jan 09 23:27:59 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1Af56k-0001pW-00 for ; Fri, 09 Jan 2004 23:27:58 +0100 Original-Received: (qmail 19889 invoked by uid 5); 9 Jan 2004 22:27:48 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 19874 invoked by uid 49493); 9 Jan 2004 22:27:48 -0000 Original-Received: from leviashcol@hotpop.com by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(0.0/5.0):. Processed in 1.01676 secs); 09 Jan 2004 22:27:48 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 9 Jan 2004 22:27:47 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HR800AJ2UEAKB@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 09 Jan 2004 17:27:47 -0500 (EST) Original-Received: from babyruth.hotpop.com (babyruth.hotpop.com [38.113.3.61]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HR800C7RUE822@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 09 Jan 2004 17:27:44 -0500 (EST) Original-Received: from hotpop.com (kubrick.hotpop.com [204.57.55.16]) by babyruth.hotpop.com (Postfix) with SMTP id BC54E21180E for ; Fri, 09 Jan 2004 22:22:44 +0000 (UTC) Original-Received: from os (unknown [62.114.57.12]) by smtp-1.hotpop.com (Postfix) with ESMTP id 59CE61A00A5 for ; Fri, 09 Jan 2004 22:11:41 +0000 (UTC) In-reply-to: Original-To: tru64-unix-managers@ornl.gov X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook, Build 10.0.2616 Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-HotPOP: ----------------------------------------------- Sent By HotPOP.com FREE Email Get your FREE POP email at www.HotPOP.com ----------------------------------------------- Xref: main.gmane.org gmane.os.tru64.managers:6157 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:6157 Thanks to : Michael Bucholtz, Rich Copeland, John Lanier, Peter Stern, Spider Boardman Charles Richmond, Roberto Romani, Johan Brusche,Jonathan Burelbach Kalle Flodkvist. - General consensus is to modify the file /etc/getttydefs as follows: default# B9600 # B9600 #\r\n\n Levi's Computational Resources\r\n\n# And take care because Spaces are important, ALSO A BLANK LINE before the line with "default". ( I tried this and it worked fine). - man gettydefs, man teletd, man issue, man issue.net to get more information about how to create a customized login banner. - /etc/motd may also contains OS version so you should rather edit the file or remove it. - Another suggestion is to put a usage banner out before people log in using tcp_wrappers (www.porcupine.org). - For ftp logins there is no direct way to change the banner except by patching the binary. - Another useful info (Though I did not test it) to change the login prompt provided by login when connecting via telnet will require modifying the "ENTRY_LOGIN" entry in the appropriate message catalog. For a US-English system, the message catalog will be either of the following: libc.cat libsec.cat <-- used when running C2, or "Enhanced Security", The message catalogs can be found: /usr/lib/nls/msg/en_US.88591 A trace of login shows that it searches for the message catalog in /usr/lib/nls/msg/C/ directory. If the locale is not set up to support this search, it will be necessary to create the symbolic link in the msg directory to point to en_US.88591. Check to see if the link "/usr/lib/nls/msg/C" exists and points to the directory where libc.cat can be found. If the link does not exist, create it and login will find the catalog (Example: # ln -s /usr/lib/nls/msg/en_US.88591 /usr/lib/nls/msg/C) The commands dspcat(1), and gencat(1) can be used to display, modify, and construct a new catalog. Overview of the procedure: 1) cd to the catalog directory: (Example: # cd /usr/lib/nls/msg/C) 2) Make a backup copy of the libc.cat and libsec.cat files. (Example: # cp libc.cat libc.cat.original) (Example: # cp libsec.cat libsec.cat.original) 3) Use dspcat(1) to create an editable copy of the catalog files. (Example: # dspcat -g ./libc.cat > /tmp/libc.cat.txt) (Example: # dspcat -g ./libsec.cat > /tmp/libsec.cat.txt) 4) Edit the text copies of the catalog files and change the "ENTRY_LOGIN" from "login:" to "Username:". Note, the ENTRY_LOGIN entry should be in section 3, entry 1 for libc.cat.txt) (Example: # vi /tmp/libc.cat.txt) Note, the ENTRY_LOGIN entry should be in section 3, entry 21 for libsec.cat.txt) (Example: # vi /tmp/libsec.cat.txt) 5) Recreate the catalog using gencat. (Example: # gencat libc.cat /tmp/libc.cat.txt) (Example: # gencat libsec.cat /tmp/libsec.cat.txt) 6) Check out the changes in the library (Example: # dspcat -g ./libc.cat | grep "Username") (Example: # dspcat -g ./libisec.cat | grep "Username") Once this has been done, the login executable will return the desired prompt instead of the default string, "login:", when invoked by telnetd. Thanks everybody. Levi -----Original Message----- From: Levi Ashcol [mailto:leviashcol@hotpop.com] Sent: Wednesday, January 07, 2004 12:07 PM To: 'tru64-unix-managers@ornl.gov' Subject: How to remove OS version from telnet/ftp banner? Hi Managers, We have GS160 running Tru64 5.1 PK4 at our site. As a security requirement we need to remove the OS version from telnet/ftp banners. I have searched google and the list archives but did not find anything useful. I found an old SUMMARY and tried to do the suggestions in it but did not work. I also edited the /etc/motd and /etc/issue but nothing was changed. Any Guru out there tried this before ? Thanks, I will summarize. Levi