From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 17 18:56:35 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 F1F7B106566B for ; Tue, 17 Nov 2009 18:56:35 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-fx0-f227.google.com (mail-fx0-f227.google.com [209.85.220.227]) by mx1.freebsd.org (Postfix) with ESMTP id 8B9658FC14 for ; Tue, 17 Nov 2009 18:56:35 +0000 (UTC) Received: by fxm27 with SMTP id 27so331017fxm.3 for ; Tue, 17 Nov 2009 10:56:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=urkaKyttsyVyO3DGRBtosOKT0LH1HiQjHmqL74f5yRY=; b=GV58cHI25J5r5c85RhE31/qrzhlJHvdvBOn3ZISls8EJ9gWryZ61LD4w6Ek71fePPM C+OiB/l5J2yvOysQP4J8DuN72Y/3665/6AP0O6A5bTALdi9kL9uYO6wJmUzoIFn3JErZ UI/wj9BqU6mDsOQDYQ01XLPHU5GFA3OlR4K9A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=IM0LFWc4O/5K4sIFTy4UjnEqo3PSyPdBuR6ruFQLWoQabSB8Ef6LN/6ObdPR3SIhN3 ET3yKv/dV654bkdUvfPuwv7Cdm+FjcuBo98slwdQ7i2hbCN1cM/xIWwaI1gQWDGkUhLP iVklVohzbZn8nUQHb3r9vB9k4JVepz2Wk+pwk= MIME-Version: 1.0 Received: by 10.216.88.1 with SMTP id z1mr337678wee.49.1258484194274; Tue, 17 Nov 2009 10:56:34 -0800 (PST) Date: Tue, 17 Nov 2009 13:56:34 -0500 Message-ID: From: Aryeh Friedman To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: 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 18:56:36 -0000 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?