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

Re: passwd change from stdin/file



On Sun, 10 Oct 1999, Julien Nadeau wrote:

> I currently work at making an automatic account activation system for
> an ISP and I'm having trouble getting passwd to change passwords without
> asking (new account info is sent to the server, and the server must
> activate
> it automatically, and set the user's default password, all of that is
> run
> async from daemons).

> I looked at the passwd sources and it got me to the libpam_misc
> misc_conv.c's
> read_string function.  I'm not really familiar with PAM so sorry if this
> was
> discussed before -- is there a way to make passwd read the actual
> password
> from stdin or from a file?  I saw something about PAM_BINARY_PROMPT and
> PAM_BINARY_MSG in the misc_conv function, could that help?

To have the password read from stdin or from a file, you would modify your
PAM application so that it uses a different PAM conversation function.  The
misc_conv function is supplied as an example, and is only useful for
interactive, commandline programs.

-Steve Langasek
postmodern programmer



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