From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 5 10:45:10 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42F501065670; Wed, 5 Jan 2011 10:45:10 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id F23678FC15; Wed, 5 Jan 2011 10:45:09 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id BA7361FFC33; Wed, 5 Jan 2011 10:45:08 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 5862A84531; Wed, 5 Jan 2011 11:45:08 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Christopher J. Ruwe" References: <20101229232030.25b2bd5a@dijkstra> Date: Wed, 05 Jan 2011 11:45:08 +0100 In-Reply-To: <20101229232030.25b2bd5a@dijkstra> (Christopher J. Ruwe's message of "Wed, 29 Dec 2010 23:20:30 +0100") Message-ID: <864o9nhbnv.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, freebsd-doc@freebsd.org, freebsd-questions@freebsd.org, freebsd-security@freebsd.org Subject: Re: setting a random password with PAM API X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2011 10:45:10 -0000 "Christopher J. Ruwe" 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. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no