Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!sunybcs!boulder!barbour From: barbour@boulder.Colorado.EDU (BARBOUR JIM) Newsgroups: comp.sys.hp Subject: Re: telnet and getty questions Message-ID: <16667@boulder.Colorado.EDU> Date: 7 Feb 90 19:31:04 GMT References: <16390@boulder.Colorado.EDU> <1080124@hpfcmgw.HP.COM> Sender: news@boulder.Colorado.EDU Reply-To: barbour@boulder.Colorado.EDU (BARBOUR JIM) Organization: University of Colorado, Boulder Lines: 52 In article <1080124@hpfcmgw.HP.COM> rocky@hpfcmgw.HP.COM (Rocky Craig) writes: >>> 2) I'd like getty to print the /etc/issue message to ptys when someone >>> attemps to telnet (and rlogin if possible) to our machines. >> /etc/getty doesn't run when you telnet or rlogin to a remoe machine, so >> you really should be saying "I'd like to get rlogind/telnetd to print..." >> But you can't do that, either, without hacking the source. >Well, how about trying this: > >1. Write the following shell script and call it "/etc/rlogind.issue": > > /bin/cat /etc/message > exec /etc/rlogind > >2. Change /etc/inetd.conf to invoke /etc/rlogind.issue when the rlogin > port is hit. inetd connects stdin and stdout of the invoked process > to the socket, so the "cat" should work. > >There are three unknowns in this solution: > >a. Will inetd invoke a shell script? Methinks it does. >b. Look at the posting time on this response. Which implies... >c. I may have dreamed this entire conversation :-) Hmm, I created a script called /usr/local/etc/rlogind.issue : #! /bin/sh if [ -r /etc/issue ] then /bin/cat /etc/issue fi exec /etc/rlogind $@ I then modified the inetd.conf file with the line: rlogin stream tcp nowait /usr/local/etc/rlogind.issue rlogind and then did % inetd -c Then, rlogin the /etc/issue message gets printed and then I get my prompt back (i.e. the exec doesn't happen). I did exactly the same thing with the telnetd and the /etc/issue message gets printed and the login prompt appears. Any ideas? Jim