[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Google
  Web www.spinics.net

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

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


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

Add to Google Powered by Linux