From owner-freebsd-questions@FreeBSD.ORG Wed Jan 18 04:23:49 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 36C7D16A41F for ; Wed, 18 Jan 2006 04:23:49 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from wolf.pjkh.com (wolf.pjkh.com [66.228.196.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFF3643D48 for ; Wed, 18 Jan 2006 04:23:48 +0000 (GMT) (envelope-from freebsd@philip.pjkh.com) Received: from localhost (localhost [127.0.0.1]) by wolf.pjkh.com (Postfix) with ESMTP id 92548172D3; Tue, 17 Jan 2006 20:23:32 -0800 (PST) Received: from wolf.pjkh.com ([127.0.0.1]) by localhost (wolf.pjkh.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08683-06; Tue, 17 Jan 2006 20:23:32 -0800 (PST) Received: by wolf.pjkh.com (Postfix, from userid 1000) id F2C55172A7; Tue, 17 Jan 2006 20:23:31 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by wolf.pjkh.com (Postfix) with ESMTP id EB2C5172A5; Tue, 17 Jan 2006 20:23:31 -0800 (PST) Date: Tue, 17 Jan 2006 20:23:31 -0800 (PST) From: Philip Hallstrom To: Jose Borquez In-Reply-To: <43CDBF2A.7040400@sbcglobal.net> Message-ID: <20060117202240.E9291@wolf.pjkh.com> References: <43CDBF2A.7040400@sbcglobal.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: amavisd-new at pjkh.com Cc: FreeBSD Questions group Subject: Re: generating new passwords 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, 18 Jan 2006 04:23:49 -0000 > Is there a command in FreeBSD 5.4 that will assign a specified user a new > password without having to create one manually using passwd? Is there also a > way to generate new passwords for multiple users at once? man pw ... -h fd This option provides a special interface by which interac- tive scripts can set an account password using pw. Because the command line and environment are fundamentally insecure mechanisms by which programs can accept information, pw will only allow setting of account and group passwords via a file descriptor (usually a pipe between an interactive script and the program). sh, bash, ksh and perl all pos- sess mechanisms by which this can be done. Alternatively, 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. If you wish to have new password confir- mation along the lines of passwd(1), this must be imple- mented as part of an interactive script that calls pw. If a value of `-' is given as the argument fd, then the password will be set to `*', rendering the account inacces- sible via password-based login. -H fd Read an encrypted password string from the specified file descriptor. This is like -h, but the password should be supplied already encrypted in a form suitable for writing directly to the password database.