From owner-freebsd-questions@FreeBSD.ORG Wed Apr 4 17:41:33 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A6F516A402 for ; Wed, 4 Apr 2007 17:41:33 +0000 (UTC) (envelope-from agus.262@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 24B0A13C45D for ; Wed, 4 Apr 2007 17:41:32 +0000 (UTC) (envelope-from agus.262@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so330402ana for ; Wed, 04 Apr 2007 10:41:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=OKl65rmFmVLteKUT8y//Jnf/vVwBZSPbMX2yMIZk5X9/zPkzsjatvbe9oTBL+CPLpjumMh9Hd/hnVPFp6lk8v3zzqP8ZwjMksFjDtQIZ8933scVbwAGeuUTPVMFtdzxt56ZUDNqqmAce1fF0gA1DdGWWPNZAB8fSB+7LbHIxJNc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=rr9u1ReQqcp2czWtuFDpHmAniJlQhyFIrY6WCRTU43uPO0xUiezk2rpPfuOuCg5U/aDu4yI1Fdp9unovKfdalrxj9DSbw65ivUDEMGpkY4oR27szpWQcplB7r4T3Rbl4FlFzqmSGoq1H53Y1463x54AsOIRzf16JKrgswrWnstg= Received: by 10.100.178.7 with SMTP id a7mr616496anf.1175708491158; Wed, 04 Apr 2007 10:41:31 -0700 (PDT) Received: by 10.100.106.3 with HTTP; Wed, 4 Apr 2007 10:41:31 -0700 (PDT) Message-ID: Date: Wed, 4 Apr 2007 14:41:31 -0300 From: Agus To: Vince In-Reply-To: <4613B91B.5000104@unsane.co.uk> MIME-Version: 1.0 References: <4612E800.3010408@daleco.biz> <4612F4BA.3030704@daleco.biz> <4613B91B.5000104@unsane.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions Subject: Re: Non Interactive passwd change via script.... 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: Wed, 04 Apr 2007 17:41:33 -0000 2007/4/4, Vince : > > Agus wrote: > > > > > > > > OK..thanks for the heads up about responding.... > > > > The problem isnt adding the user....i ve done that......the problem is > > creating the password for the user as i tried to say in the first > email... > > > Assuming you dont mean actually generating the password maybe you need the > -h fd > flag to pw > or more specificly (from the manpage) > pw will prompt for the user's password if -h 0 is given, > nominating stdin as the file descriptor on which to read > the password. Note that this password will be read only > once and is intended for use by a script rather than for > interactive use. > > so something like > echo PASSWD | pw add user wibble -h 0 > will create a user wibble with password of PASSWD > > or > echo $PASSWORD | pw add user $USERNAME -h 0 > setting $PASSWORD and $USERNAME as needed. > > Vince > > > > > thanks kevin, > > _______________________________________________ > > 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" > > Thanks Vince, that was exactly what i was looking for.....i read the man page and saw the -h or th -H ir it is encrypted.....but i copuldnt make it work, didnt know how.... your example lightens up everything....greatttt thanks alot.... i will try it as sonn as i get home... thanksss