سؤال

I've got a C program that runs as root, and sets user's passwords using PAM, via a call to pam_chauthtok. This works, but it allows weak passwords to be set and doesn't save the password history that would be saved if the user changed their own password.

Is there any way I can force pam to act as if I was running as the user whose password I am changing?

هل كانت مفيدة؟

المحلول

I've solved this by having the pam converstation function error out if it receives a message of type error from pam. This seems to work.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top