From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 17 19:30:31 2009 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 9DB3B106566C for ; Tue, 17 Nov 2009 19:30:31 +0000 (UTC) (envelope-from spawk@acm.poly.edu) Received: from acm.poly.edu (acm.poly.edu [128.238.9.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3C93D8FC19 for ; Tue, 17 Nov 2009 19:30:30 +0000 (UTC) Received: (qmail 15432 invoked from network); 17 Nov 2009 19:30:30 -0000 Received: from unknown (HELO ?10.0.0.158?) (spawk@128.238.64.31) by acm.poly.edu with AES256-SHA encrypted SMTP; 17 Nov 2009 19:30:30 -0000 Message-ID: <4B02F99E.2030205@acm.poly.edu> Date: Tue, 17 Nov 2009 14:29:34 -0500 From: Boris Kochergin User-Agent: Thunderbird 2.0.0.23 (X11/20090910) MIME-Version: 1.0 To: Aryeh Friedman References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: unit testing automated password assignment 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: Tue, 17 Nov 2009 19:30:31 -0000 Aryeh Friedman wrote: > I have a script that automatically creates a user and sets their password: > > echo $3 | sudo pw useradd $1 -m -c "$2" -s tcsh -h0 > > and by my employer's policy I need to unit test... my question is > how... the checking for user existence and such is easy but how do I > test that the password is correct? > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > Have a look at http://cr.yp.to/checkpwd.html. A FreeBSD port is available in security/checkpassword. -Boris