Re: query regarding pam_set_item

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 3 Nov 2007, Varun Vijayvargiya wrote:

> I am an undergraduate currently involved in a project on PAM..actually what
> i m trying to do is very simple..get a username and password from a remote
> user accessing my website..use these 2 parameters to authenticate the user
> using PAM on my server.
> The problem:
> 
> I can collect the these 2 parameters. But how do i pass it to pam modules so
> that they understand this.. I mean there is no one at the server who will
> type the password wen the module prompts for it.
> 
> Looking into the code for pam_sm_authenticate calling _unix_read_password()
> i discovered that before prompting the user for a password, it tries to get
> it frm pam_get_item().
> So i though that before calling pam_authenticate in my application code, i
> set the incoming password using pam_set_item(handle,PAM_AUTHTOK,"<the
> passwd>")
> But it gives a PAM_BAD_ITEM return value
> 
PAM_AUTHTOK is accessible by PAM library itself and PAM modules only. If you 
need to pass the password to PAM, you need to supply the conversation function 
that will feed the password in reply to PAM_PROMPT_ECHO_OFF PAM message.
-- 

    Sincerely Your, Dan.


_______________________________________________
Pam-list mailing list
Pam-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/pam-list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux