From owner-freebsd-questions@FreeBSD.ORG Sat Dec 7 17:08:01 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C958AB4 for ; Sat, 7 Dec 2013 17:08:01 +0000 (UTC) Received: from a0i55.smtpcorp.com (a0i55.smtpcorp.com [64.131.95.140]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0B0B21A1A for ; Sat, 7 Dec 2013 17:08:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=a0_1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References:Subject:Cc:To:From; bh=HTFOer5h9hJto3r0jbI3DfnZnr/SHwpR4fVJnEExNtk=; b=nlE8sM80Ng3rZyIBEfZ/PCjvhmkqTg15bEXmJA5HNQBJGoQyK1qF/wnYDazmNd7xhfBZeQIKaWs52FdSDBxN+ysjCdNF9oHW7ZkKx2FikltScXxqjQYrNsK1vW0xs00Ewf1DOivisEAcFRVTBx/78dE/swcV0ztRu2nQ7OwRdvg=; From: Daniel Corbe To: Waitman Gobble Subject: Re: PAM Application Programming and Password prompts References: Date: Sat, 07 Dec 2013 20:07:42 +0300 In-Reply-To: (Waitman Gobble's message of "Sat, 7 Dec 2013 07:39:56 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Smtpcorp-Track: 366817034.1.36917638 X-debug-m-data: member_id=10661 trim_headers=Received X-debug-m-user: D: 3807463 N:366817034 Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Dec 2013 17:08:01 -0000 Waitman Gobble writes: > On Sat, Dec 7, 2013 at 7:29 AM, Daniel Corbe 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to " > freebsd-questions-unsubscribe@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 I think you answered my question with the second link. I need to look at pam_conv a little more closely. Thank you. -Daniel