SamQi has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to use Authen::PAM to update my password from a perl script (eventually this will be part of a CGI). Right now I just want to make sure I've got the PAM stuff ironed out.

I've searched high and low, and everything indicates that what I'm doing in my code is correct. In fact, when I call pam_authenticate, it works! When I try to call pam_chauthtok, however, it doesn't even get to my convesation function (I had some diagnostic print statements in there that were only printed when I authenticated).

Any ideas?

Replies are listed 'Best First'.
Re: Changing Password using Authen::PAM
by hv (Prior) on Mar 01, 2003 at 14:29 UTC

    Authen::PAM includes a FAQ.pod in which the second question is "Can I change a password non interactively?", and the answer gives full example code. Have you tried modifying your code along the lines of that example?

    Hugo
      Yes, but it is worth noting that the only thing that changes is the conversation function. When I call pam_chauthtok, it never even calls the conversation function. It's weird.