[comp.unix.wizards] gettydefs and the login prompt

tab@auc.UUCP (Terrence Brannon ) (11/24/87)

The manual pages for sys V unix state that the prompt you get to
log in comes from a field in gettydefs. In customizing my 3B2, I
edited the login field of this file that originally said "login:"
I changed the prompt to something different, but this new prompt
will only show up on the first login attempt. If this login fails
for some reason, the prompt goes back to "login:" even though I
have edited out every occurence of this prompt in /etc/gettydefs.

ballou@brahms.Berkeley.EDU.UUCP (11/25/87)

In article <32157@auc.UUCP> tab@auc.UUCP (0-Terrence Brannon ) writes:
>The manual pages for sys V unix state that the prompt you get to
>log in comes from a field in gettydefs. In customizing my 3B2, I
>edited the login field of this file that originally said "login:"
>I changed the prompt to something different, but this new prompt
>will only show up on the first login attempt. If this login fails
>for some reason, the prompt goes back to "login:" even though I
>have edited out every occurence of this prompt in /etc/gettydefs.

This is not surprising, since only the first login prompt is issued by
/etc/getty.  After getty reads the login name, it execs login with
this name as an argument.  If login does not get a satisfactory password,
it then prompts for another login name with its "login: " prompt.
Kenneth R. Ballou			ARPA:  ballou@brahms.berkeley.edu
Department of Mathematics		UUCP:  ...!ucbvax!brahms!ballou
University of California
Berkeley, California  94720

bernie@codas.UUCP (11/25/87)

In article <32157@auc.UUCP> tab@auc.UUCP (Terrence Brannon ) writes:
> 
> The manual pages for sys V unix state that the prompt you get to
> log in comes from a field in gettydefs.

This is true only for the prompt from 'getty'.

> I changed the prompt to something different, but this new prompt
> will only show up on the first login attempt. If this login fails
> for some reason, the prompt goes back to "login:" even though I
> have edited out every occurence of this prompt in /etc/gettydefs.

This is because the second and subsequent prompts come from 'login'
not 'getty'.  These continue until 'login' times out and 'getty'
restarts.  If you have the login.c source, you can change it.
-- 
Bernie Brown
AT&T, Customer Billing Systems, Altamonte Springs, FL (305)767-2668
bernie@codas.att.com

karl@mumble.cis.ohio-state.edu (Karl Kleinpaste) (11/25/87)

tab@auc.UUCP writes:
   The manual pages for sys V unix state that the prompt you get to
   log in comes from a field in gettydefs. In customizing my 3B2, I
   edited the login field of this file that originally said "login:"
   I changed the prompt to something different, but this new prompt
   will only show up on the first login attempt. If this login fails
   for some reason, the prompt goes back to "login:" even though I
   have edited out every occurence of this prompt in /etc/gettydefs.

This is because by the time the second prompt comes up, it's no longer
getty that's printing it; it's login itself, usually /bin/login.
Getty runs long enough to get your terminal speed figured out and ask
for you a login name, using the prompt from gettydefs; then it execs
login, which asks for your password, verifies it and then execs your
shell.  If the password was wrong, it wants to try again.  It doesn't
know to check gettydefs; it just prints "login:" blindly.
-=-
Karl

Hampton@DOCKMASTER.arpa (11/25/87)

Your problem is simple.  The original prompt you receive is the prompt
from /etc/gettydefs.  This is printed by 'init', before 'login' is ever
invoked.  The subsequent prompts are from a hardcoded line in the
'login' program itself.

David Hampton

lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) (11/26/87)

In article <32157@auc.UUCP>, tab@auc.UUCP (Terrence Brannon ) writes:
	...
> for some reason, the prompt goes back to "login:" even though I
> have edited out every occurence of this prompt in /etc/gettydefs.

This is about the 7th posting on your question but there is something
important that should be said.

Be very careful with what you display before logging in.  If you print
anything else besides "login:" you are giving crackers clues about
the system they reached.  The less they know the better.

If you say anything like "welcome to the such-and-such computer system",
you can forget prosecuting anyone for breakins.  The legal issues are
a big can of worms (are lawyers worms (-: ), I could go on, but you
didn't ask for it.

You might even consider changing the getty/login prompt from "login:"
(UN*X) to "logon " (other OS's) just to throw crackers off track.

gwyn@brl-smoke.ARPA (Doug Gwyn ) (11/27/87)

In article <2330@tut.cis.ohio-state.edu> lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
>You might even consider changing the getty/login prompt from "login:"
>(UN*X) to "logon " (other OS's) just to throw crackers off track.

Los Alamos National Laboratory

Would you like to play a game?

lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) (11/28/87)

In article <6752@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes:
> >You might even consider changing the getty/login prompt from "login:"
	...
> Los Alamos National Laboratory
> 
> Would you like to play a game?

Let's play global thermonuclear war.

Aren't you a bit nervous having a Los Alamos computer on a public
network?  I certainly am.  Even ArpaNet for that matter isn't all
that secure.

rick@svedberg.bcm.tmc.edu (Richard H. Miller) (12/07/87)

In article <2346@tut.cis.ohio-state.edu>, lvc@tut.cis.ohio-state.edu (Lawrence V. Cipriani) writes:
> 
> Aren't you a bit nervous having a Los Alamos computer on a public
> network?  I certainly am.  Even ArpaNet for that matter isn't all
> that secure.

There is no reason to be nervous. The machines accessable to the net DO NOT have any secure (read
classified) data on them. As I understand the regulations, anytime classified data is being run on
a machine, NO network access is allowed and the memory and mass storage are scrubbed after the
tasks are finished. 

Richard H. Miller                 Email: rick@svedburg.bcm.tmc.edu
Head, System Support              Voice: (713)799-4511
Baylor College of Medicine        US Mail: One Baylor Plaza, 302H
                                           Houston, Texas 77030