Subject: Re: Login Banner

From: [email-masked] (John Caruso)
Date: 22 Mar 1994 00:39:39 -0500

Jeff Giacobbe <[email-masked]> wrote:
>[email-masked] (Phil J Barrett) writes:
>
>>Anyway, on a related question, how can I set the message that appears 
>>_before_ a user logs in?
>
>I'm surprised no one has mentioned the *easy* method:
>In Solaris 2.x, just create a text file called /etc/issue that contains
>the banner.

The easy method is no good because it doesn't work for telnet sessions
(or at the very least it's no good if you rely on telnet sessions, as
we do almost exclusively).  Our solution to this problem was:  1) get
tcp wrappers, 2) modify the default "shell" command code to echo output
rather than sending it to /dev/null, and 3) add an entry to hosts.allow
like the following:

        in.telnetd: ALL : ( /usr/local/bin/crlf /etc/issue )

"crlf" is a simple cat-like program which changes all \n's to \r\n's,
which is required for telnet sessions from some hosts.  This method
has been working just fine for us for the past year.

The code modification to the tcp wrappers basically involves patching
shell_cmd.c with the "twist" code from options.c.  It seems to me
that this should be the default method of operation for the wrappers,
since it's easy enough to toss output if necessary and it's very
useful to be able to send back an error message when rejecting a
connection or to display preliminary information before accepting a
connection (like /etc/issue in this case).

Of course, Sun *could* just fix in.telnetd and save us the trouble....

---------------------------------------------------------------------
 John Caruso                                    [email-masked]
 Unix/VMS System Administrator                  caruso@UMUC (Bitnet)
 University of Maryland University College      (301) 985-7447
---------------------------------------------------------------------