Changing the Login Prompt

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Robert A. Klahn
Date:  
Subject: Changing the Login Prompt
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 <> 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" <>
> 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 -
> >
> >
> 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 -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss



--
Robert A. Klahn

AIM: rklahn
Yahoo Messenger: klahn
IRC:

"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