Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!clyde.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!samsung!sdd.hp.com!cnd.hp.com!jmc From: jmc@cnd.hp.com (Jerry McCollom) Newsgroups: comp.sys.hp Subject: Re: putting a message before the LOGIN PROMPT??? Message-ID: Date: 19 Feb 91 19:29:00 GMT References: <1991Jan25.171500.22558@hoss.unl.edu> <17780004@hpfcmgw.HP.COM> Sender: news@sdd.hp.com (Usenet News) Organization: Colorado Networks Division, Hewlett-Packard Co. Lines: 50 In-Reply-To: jmc@cnd.hp.com's message of 6 Feb 91 08:54:00 Nntp-Posting-Host: hpcndnm.cnd.hp.com In article jmc@cnd.hp.com (Jerry McCollom) writes: > The solution I've always recommended is as follows: > > 1. Create a script called "/etc/telnetd-banner" (or whatever you > want to call it): > > #!/bin/sh > cat /etc/issue # or whatever banner you want > exec /etc/telnetd > > and make it executable. > > > 2. Change the telnet line in /etc/inetd.conf to: > > telnet stream tcp nowait root /etc/telnetd-banner telnetd > > > 3. Reconfigure inetd: > > /etc/inetd -c > > You'll get the /etc/issue banner at subsequent telnet logins. I was asked if the same could be done for rlogind. It is ugly, though possible, with one modification to the banner script (call it /etc/rlogind-banner): #!/bin/sh echo "\000" # fool rlogin (actually, rcmd(3)) cat /etc/issue # or whatever you want exec /etc/rlogind $* Do the other stuff for rlogind (change inetd.conf, reconfigure inetd) and you're set. In the script, you need to echo the null to fool the rlogin client into thinking the connection setup went ok. The "ugly" part comes about when you notice some excess whitespace emitted after the banner -- I haven't investigated why that happens. The other ugliness might arise if there are errors during connection setup (at the rcmd(3) level, not at the rlogin protocol level). Otherwise, in both the hosts.equiv authenticated and non-authenticated cases, this seems to work fine. Jerry McCollom Hewlett Packard, Colorado Networks Division jmc@cnd.hp.com ("it ain't supported, but it works and it sure beats editing the binary")