How to prompt for some information from PAM module

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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've pased the sample code I've written at ,
please suggest me what could be wrong.

Gaurav Gupta

Site Timeline