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

change pam authtok from c code



I am trying to implement a feature in a UNIX passwd-programm. The
authok, which is to be the future passwd for login, is randomly
generated and stored in char * randstring[].

I want to get pam inject that randstring, so that this randstring is
the new password.

I have tried

retval = pam_set_item(pamh, PAM_AUTHTOK, randstring);

which does not work, although it returns PAM_SUCCESS. Eventually, I get
a permission denied error and the program exits. Can anybody point me
in the right direction or show me how to properly set a password from a
string in PAM API?

Thank you,
-- 
Christopher J. Ruwe
TZ GMT + 1


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