Changing the Login Prompt

Robert A. Klahn plug-discuss@lists.plug.phoenix.az.us
Tue, 29 Jan 2002 13:37:13 -0700


Bob: I dont think this is what Brian was asking for. He is NOT asking how to change the Bash command line prompt. He is asking how to change the console login prompt, me thinks.

I think the real (short) answer is "Maybe, probably not".

Most default Linux distribution installs use mingetty for their console prompt services. There are a lot of good reasons for this, mingetty is a pretty thin program, and this is an area where security is mucho way important, and we like to keep things small, and thus, well understood, when it comes to security services.

There is no way to change the login prompt in mingetty.

From mingetty.c:

        write (1, hn, strlen (hn));
        write (1, LOGIN, sizeof (LOGIN) - 1);

Before this code is reached, hn equals your host name (it might be your FQDN, see the --long-hostname option for mingetty, see "man mingetty"), and LOGIN equals " login: "

There are some getty alternatives. One of the options to fbgetty does exactly what you want, if we are to believe its documentation. See http://fbgetty.meuh.eu.org/docs/fbgetty.8.html. It does, however, seem to require that the console be running in Frame Buffer mode, which not all Linuxes do. Im having a hard time believing that this is really a requirment, however.

Another option would be to "roll your own" getty. Many others before you have, so why not?

Good Luck.

Bob.

On Tue, 29 Jan 2002 10:58:14 -0800 (PST)
bob smith <sekretskwerl@yahoo.com> wrote:

> Here you go Brian.
> 
> http://www.linuxnewbie.org/nhf/intel/shells/bashconfig.html
> 
> Just do a search within your browser for "prompts" at
> this site.
> --- "Simper, Brian D" <brian.d.simper@intel.com>
> wrote:
> > 
> > Is there any way to change the login prompt in
> > Linux?  The default is, of
> > course:
> > 
> > <hostname> login:
> > 
> > I know about /etc/issue and /etc/motd but those are
> > not what I am looking
> > for.  I would like to be able to modify the prompt
> > if possible.  Can this be
> > changed?
> > 
> > Brian
> > ________________________________________________
> > See http://PLUG.phoenix.az.us/navigator-mail.shtml
> > if your mail doesn't post to the list quickly and
> > you use Netscape to write mail.
> > 
> > PLUG-discuss mailing list  - 
> > PLUG-discuss@lists.plug.phoenix.az.us
> >
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions! 
> http://auctions.yahoo.com
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
> 
> PLUG-discuss mailing list  -  PLUG-discuss@lists.plug.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


-- 
Robert A. Klahn
rklahn@acm.org
AIM: rklahn
Yahoo Messenger: klahn
IRC: rklahn@irc.openprojects.net

"Hope has two beautiful daughters: Anger and Courage. Anger at the way
things are, and Courage to struggle to create things as they should be." -
St. Augustine