AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only

How to prompt for some information from PAM module

  • 1.  How to prompt for some information from PAM module

    Posted Fri January 07, 2011 06:09 AM

    Originally posted by: SystemAdmin


    Hello Folks,

    I'm writing a Plug-gable authentication module for ssh. I am looking for prompting for some extra information after user name and password verification but before giving access to user. Can anyone suggest how should I do this.Actually after SSH I want to extend the same for some other services. So I am looking at some PAM module level suggestion.

    I tried using conversation method with message style=PAM_PROMPT_ECO_ON but it results in PAM_CONV_ERR and conversation fails. Is it right way to interact or please suggest me If I'm doing wrong somewhere. When I use message style=PAM_PROMPT_ECO_OFF communication succeeds but message is not shown and interaction doesn't happen.

    I'm attaching the sample code I've written, please suggest me what could be wrong.
    Thanks & Regards,
    Gaurav Gupta