Changing pre-login prompt - Linux

This is a discussion on Changing pre-login prompt - Linux ; Hi, I tried changing the initial prompt displayed by changing the login prompt inside a custom made pam_issue library. But this prompt takes into effect only if I enter a wrong password and the login prompt is displayed again. I ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Changing pre-login prompt

  1. Changing pre-login prompt

    Hi,

    I tried changing the initial prompt displayed by changing the login
    prompt inside a custom made pam_issue library. But this prompt takes
    into effect only if I enter a wrong password and the login prompt is
    displayed again.

    I guess this is because the getty while spawning the login program
    doesnt really use the pam infrastructure. I read that I can do this
    using gettytab file. But I need to change the prompt after reading
    some value from a /dev/file, ie its not a static value always

    Is my understanding of this prompt display correct?.Also can someone
    help me how to get this done??


    Thanks
    Reji Thomas

  2. Re: Changing pre-login prompt

    On May 12, 6:17 pm, rejithoma...@gmail.com wrote:
    > Hi,
    >
    > I tried changing the initial prompt displayed by changing the login
    > prompt inside a custom made pam_issue library. But this prompt takes
    > into effect only if I enter a wrong password and the login prompt is
    > displayed again.
    >
    > I guess this is because the getty while spawning the login program
    > doesnt really use the pam infrastructure. I read that I can do this
    > using gettytab file. But I need to change the prompt after reading
    > some value from a /dev/file, ie its not a static value always
    >
    > Is my understanding of this prompt display correct?.Also can someone
    > help me how to get this done??
    >
    > Thanks
    > Reji Thomas



    In short Does someone know how I can change the agetty prompt, since I
    am using agetty and not getty. I went through agetty.c and I see
    login: prompt hardcoded there. So just wondering if there is any work
    around?

  3. Re: Changing pre-login prompt

    On Tue, 13 May 2008 03:01:36 -0700, rejithomas.d wrote:

    > On May 12, 6:17 pm, rejithoma...@gmail.com wrote:
    >> Hi,
    >>
    >> I tried changing the initial prompt displayed by changing the login
    >> prompt inside a custom made pam_issue library. But this prompt takes
    >> into effect only if I enter a wrong password and the login prompt is
    >> displayed again.
    >>
    >> I guess this is because the getty while spawning the login program
    >> doesnt really use the pam infrastructure. I read that I can do this
    >> using gettytab file. But I need to change the prompt after reading
    >> some value from a /dev/file, ie its not a static value always
    >>
    >> Is my understanding of this prompt display correct?.Also can someone
    >> help me how to get this done??
    >>
    >> Thanks
    >> Reji Thomas

    >
    >
    > In short Does someone know how I can change the agetty prompt, since I
    > am using agetty and not getty. I went through agetty.c and I see login:
    > prompt hardcoded there. So just wondering if there is any work around?


    Two options:
    1) Compile your own version of *getty that'll use what you want
    2) Replace getty with something else that allows what you need. getty
    needn't be all that magical, especially if you don't need serial
    communication. I recently replaced a getty with a little shell script to
    avoid a feedback loop - it would just read a line, test for the presence
    of a magic cookie, and upon seeing said cookie, exec /bin/login.


  4. Re: Changing pre-login prompt

    On a Debian system, normally using getty, pre-login prompt, say
    "Debian GNU/Linux 4.0 'hostname' 'tty'", can be modified in /etc/issue
    ....
    ?

+ Reply to Thread