setting a random password with PAM API

Christopher J. Ruwe cjr at
Wed Jan 5 18:34:13 UTC 2011

On Wed, 05 Jan 2011 11:45:08 +0100
Dag-Erling Smørgrav <des at> wrote:

> "Christopher J. Ruwe" <cjr at> writes:
> > I am trying to implement the feature to set a random password like
> > in BSD "pw usermod -W" in the Solaris passwd. Regrettably, I have
> > not found or perhaps not understood the PAM API documentation on
> > how to _inject a given string_ into the change-auth-token function
> > pam_chauthtok(...), which always jumps in an interactive pw-changing
> > loop.
> There is no reliable way to do that.  You don't even know that there
> is such a thing as a password.

Thank you very much for your answer, although I suspected so, I still
hoped for another content. 

Kind regards,
Christopher J. Ruwe
TZ GMT + 1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
Url :

More information about the freebsd-questions mailing list