Hmm. After taking a look at the login process
(http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hllogin.html) I think
I'll have to recompile /bin/login from the util-linux-2.10f-7 package to get it
to work the way I want.
My virtual consoles display the hostname preceding the text "login:" prompt
because mingetty et al. support translation characters in /etc/gettydefs eg.
"@S" (for hostname)
However apparently gettys don't work over a network connection (eg. with inetd
& telnet & pseudo terminals (pts)) because they're only made for tty/S stuff.
And because the "in.telnetd" wrapper in inetd.conf (essentially telnetd)
invokes /bin/login as the default login program, I'll have to either find
another login program to use or recompile the one from util-linux-2.10f-7 with
something like gethostaddr() or something or hardcode the text I want :)
I've tried writing a shell script to use with in.telnetd -L <login program>,
login.sh:
#!/bin/bash
echo `hostname` login:
which doesn't work :)
Red Hat Linux release 6.2 (Zoot)
Kernel 2.2.14-5.0 on an i586
telnetd: /login.sh: Exec format error
.
Connection to host lost.
<shrug>
Heh.
-----Original Message-----
From: Martin Visser [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 18 September 2007 6:59 PM
To: [EMAIL PROTECTED]
Cc: Minh Van Le; [email protected]
Subject: Re: [SLUG] How do I customize the login: prompt ?
yes, some googling resulted in finding at least one version of getty.c that
only had "login:" hard-coded.
However there are lots of reference to "pam_user_prompt" which seem to
indicate that you can add a pam module to allow a change to be configured.
Someone might be able to add a clue - or just keep on following the google
conga!
On 9/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>>>> "Minh" == Minh Van Le <[EMAIL PROTECTED]> writes:
Minh> Yeah I forgot to mention that /etc/issue and /etc/issue.net are
Minh> banners created by rc.local.
Minh> What I'm trying to modify is the actual "login:" prompt itself.
It depends on which getty program you're using. For mgetty, the -p
option should work; for the Linux getty program there is no way.
--
Regards, Martin
Martin Visser
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html