From owner-freebsd-questions@FreeBSD.ORG Thu Aug 3 00:04:05 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D901016A4DD for ; Thu, 3 Aug 2006 00:04:05 +0000 (UTC) (envelope-from micahjon@ywave.com) Received: from relay0.av-mx.com (relay0.av-mx.com [137.118.16.125]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68A2643D4C for ; Thu, 3 Aug 2006 00:04:05 +0000 (GMT) (envelope-from micahjon@ywave.com) X-Virus-Scan-Time: 0 Received: from [137.118.16.61] (HELO mx0.av-mx.com) by relay0.av-mx.com (CommuniGate Pro SMTP 4.2.10) with SMTP id 342287753 for freebsd-questions@freebsd.org; Wed, 02 Aug 2006 20:04:04 -0400 Received: (qmail 14396 invoked from network); 3 Aug 2006 00:04:03 -0000 Received: from dsl17146.ywave.com (HELO ?192.168.1.65?) (micahjon@ywave.com@216.227.104.146) by 0 with SMTP; 3 Aug 2006 00:04:03 -0000 X-CLIENT-IP: 216.227.104.146 X-CLIENT-HOST: dsl17146.ywave.com Message-ID: <44D13D71.2070205@ywave.com> Date: Wed, 02 Aug 2006 17:04:01 -0700 From: Micah User-Agent: Thunderbird 1.5.0.5 (X11/20060730) MIME-Version: 1.0 To: Greg 'groggy' Lehey References: <58ebaa710608020248r1cfb7915t4caa0f6fcdbecb84@mail.gmail.com> <200608021553.19086.phoenix.lists@gmail.com> <20060802235432.GT48182@wantadilla.lemis.com> In-Reply-To: <20060802235432.GT48182@wantadilla.lemis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Simon Phoenix , freebsd-questions@freebsd.org Subject: Re: Changing user password from command line X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2006 00:04:05 -0000 Greg 'groggy' Lehey wrote: > On Wednesday, 2 August 2006 at 15:53:07 +0300, Simon Phoenix wrote: >> On Wednesday 02 August 2006 12:48, Mike Fern wrote: >>> Dear all, >>> Does anybody know a program which is able to change user password from >>> command line? >>> We can add a user using single line pw (pw useradd), but i need >>> ability to set the password also, instead of old command "passwd user" >>> and then writing to stdin. >> man pw >> >> Look for -h option description. > > The advantage of using passwd(1) is that it is available on all > UNIX-like systems (pw(8) isn't), and that it's easier to use. pw's ability to alter password files in directories other than /etc comes in handy sometimes. Unless there's an undocumented way to do this with passwd. - Micah