Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!ptsfa!ihnp4!occrsh!occrsh.ATT.COM!rjd From: rjd@occrsh.ATT.COM Newsgroups: comp.unix.wizards Subject: Re: login prompt not staying set Message-ID: <142700001@occrsh.ATT.COM> Date: Tue, 1-Dec-87 14:13:00 EST Article-I.D.: occrsh.142700001 Posted: Tue Dec 1 14:13:00 1987 Date-Received: Sun, 6-Dec-87 07:49:25 EST Lines: 38 Nf-ID: #N:occrsh.ATT.COM:142700001:000:2032 Nf-From: occrsh.ATT.COM!rjd Dec 1 13:13:00 1987 > 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. As it should be. First a lesson on the sequence of events up to the point in question that happen when a user logs in: 1) /etc/getty is the first program run on a port (started by /etc/init according to the information in /etc/inittab). It sets up the initial port protocol (as defined in gettydefs) and gives the login message (also specified in gettydefs). 2) Once a user (or whatever) responds to that, possibly customized, login prompt, the getty performs an exec of the form: login3) The login program then searches the /etc/passwd file to see if the login exists and if so, if it has a password. If it does not exist or does and has a password, the program prompts for it. 4) Now here's the part you are interested in: If the login does not exist and anything is entered or if the login exists, is passworded, and the incorrect password is entered, the *login* program prints the "Login incorrect" message and then RE-PROMPTS FOR THE LOGIN ID with its own prompt, which is "login:".... So your solution is to either modify the /bin/login program with your new prompt or have the login program terminate after an incorrect attempt (maybe by picking a short timeout interval for getty, which does not sound like a very good method to me.) If you enter a "control-d" at this /bin/login login: prompt, it will exit and return you to init, which will start up the getty running at the protocols set up in gettydefs, thus reprinting the /etc/gettydefs login prompt. Randy