FAQ - Changing the login prompt message

From: William H. Magill <magill_at_dccs.upenn.edu>
Date: Mon, 22 May 95 09:34:32 -0400

> Does somebody know how to place a message BEFORE the login: prompt?

                                                        5/22/95

This is known to work as described on Digital Unix 3.0 and 3.2.

There is an "undocumented" feature in /etc/gettydefs.

Basically, there is one sentence at the end of the second paragraph in the
gettydefs man page which, once you know the secret, describes it.

  "...If a match is not found,
  the first gettydefs file entry is used; therefore the first entry in get-
  tydefs must be the default entry. The maximum length of each entry is 255
  characters."

This "default" entry is NOT in the standard (ie distributed) /etc/gettydefs
file and is the entry used by telnet.
------------------------<excerpt from /etc/gettydefs>-----------------
# OSF/1 Release 1.0
#
#

default#B9600#B9600# %v(%h)\r\n\r\n Data and Computing \r\n \
        Unauthorized use prohibited \
\n\r#default

console# B9600 HUPCL CS8 CLOCAL # B9600 SANE IXANY TAB3 CLOCAL #\r\n\r\n%v (%h)
%t\r\n\r\n\rlogin: #console
------------------------<cut here>-----------------

The example above uses "line continuation" to place the "one entry line" on
three separate lines.

Two IMPORTANT "gotcha's" ...

The first "NON # line" must be a SPACE, then the "default#" entry.

The TOTAL length of the line (default# to #default) is 255 characters, not
just the message text.

"login:" is automatically appended to the line.

Finally:

You will note that "B9600" or "B9600 SANE" can be used to set the login
characteritstics. However you CANNOT use "B9600 DEC" to "fix" the use of
DEL to delete characters instead of "backspace" at the "login:" and
"password" prompts. This has been reported to Software Engineering as a
"design deficiency" (Yes, it works as designed, "a feature, not a bug!")

T.T.F.N
William H. Magill Manager, PennNet Computing Services
Data Communications and Computing Services (DCCS) University of Pennsylvania
Internet: magill_at_dccs.upenn.edu magill_at_acm.org
          magill_at_upenn.edu http://pobox.upenn.edu/~magill/
 
Received on Mon May 22 1995 - 09:35:07 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT