PAM Application Programming and Password prompts

Waitman Gobble gobble.wa at gmail.com
Sat Dec 7 15:39:59 UTC 2013


On Sat, Dec 7, 2013 at 7:29 AM, Daniel Corbe <corbe at corbe.net> wrote:

>
> Hi,
>
> I hope this is the right place to ask programming related questions.
>
> I'm looking at the sample PAM application in the handbook and it appears
> straight-froward enough.
>
> But pam_authenticate() seems to emit its own password prompt and there
> seems to be no obvious way to simply feed it a plain text password.
>
> I'm manually collecting a password from the user.
>
> Can someone point me in the right direction?
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at freebsd.org"
>


Take a look at the src for su in src/usr.bin/su/su.c
ie,
https://dx.burplex.com/src/usr.bin/su/su.c

Also, here is a simple example of Qt authenticating with pam.

https://github.com/creamy/qt-pam-example/blob/master/mainwindow.cpp


-- 
Waitman Gobble
San Jose California USA
510-830-7975


More information about the freebsd-questions mailing list