From owner-freebsd-questions@FreeBSD.ORG Sat Dec 7 15:39:58 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD7CBBB3 for ; Sat, 7 Dec 2013 15:39:58 +0000 (UTC) Received: from mail-bk0-x22b.google.com (mail-bk0-x22b.google.com [IPv6:2a00:1450:4008:c01::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 603BF1505 for ; Sat, 7 Dec 2013 15:39:58 +0000 (UTC) Received: by mail-bk0-f43.google.com with SMTP id mz12so739657bkb.30 for ; Sat, 07 Dec 2013 07:39:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2G31fGerHkAsDU9pDuQMtZoDKL6+vMua/raX5WVxBNU=; b=g5ddRvLFbwdFfK7xjZ8XmUSC/jr7d0//AJClrfZHNtoqIKZzh6zfKUfMtwHKygs02d v2xNwZbJ+kp3GeIt3aEkFvWmr9zQrU21aQnmhd6kZKAFgc4OExda5p3XIXXBjhmO/rSP 6GHlXtLqYXENd3rpwxdTa5goE8TGscog8Pp4nfourZeUU8fJALxTvOksdJ1b+AXaI499 bjtiQZEgquVe1IVQ9TdGYm2akftbmlAue8AY1Wcb/O/Z2szupdsXj+QX1Un+9dWeD+8u qmAnYOwAeAuEHInjMVBG4lGyOdpV8iFnZ+Im9GB6QEvOc5bUdUMvkb0VnWleZSIryTTd m7Ew== MIME-Version: 1.0 X-Received: by 10.204.122.1 with SMTP id j1mr3088171bkr.57.1386430796334; Sat, 07 Dec 2013 07:39:56 -0800 (PST) Received: by 10.204.123.193 with HTTP; Sat, 7 Dec 2013 07:39:56 -0800 (PST) In-Reply-To: References: Date: Sat, 7 Dec 2013 07:39:56 -0800 Message-ID: Subject: Re: PAM Application Programming and Password prompts From: Waitman Gobble To: Daniel Corbe Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 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 15:39:59 -0000 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