From owner-freebsd-security Wed May 2 8: 7:37 2001 Delivered-To: freebsd-security@freebsd.org Received: from ringworld.nanolink.com (ringworld.nanolink.com [195.24.48.13]) by hub.freebsd.org (Postfix) with SMTP id 2DC0237B423 for ; Wed, 2 May 2001 08:07:34 -0700 (PDT) (envelope-from roam@orbitel.bg) Received: (qmail 90544 invoked by uid 1000); 2 May 2001 15:05:43 -0000 Date: Wed, 2 May 2001 18:05:43 +0300 From: Peter Pentchev To: Lee Smallbone Cc: freebsd-security@freebsd.org Subject: Re: useradd/adduser Message-ID: <20010502180543.C88365@ringworld.oblivion.bg> Mail-Followup-To: Lee Smallbone , freebsd-security@freebsd.org References: <200105021613.RAA25130@mailgate.kechara.net> <20010502180257.B88365@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010502180257.B88365@ringworld.oblivion.bg>; from roam@orbitel.bg on Wed, May 02, 2001 at 06:02:57PM +0300 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, May 02, 2001 at 06:02:57PM +0300, Peter Pentchev wrote: > On Wed, May 02, 2001 at 03:59:50PM +0100, Lee Smallbone wrote: > > I see what you mean about the synopsis...! > > > > From what I can see it isn't possible to supply the password to pw? > > I'm using md5 passwords, and can easily have the script in question encode > > the password prior to calling pw, so is it possible to use (in the verse of > > pw), something along the lines of: > > > > pw useradd -n test -c "Test User" -d /home2/test -m -s sh $md5encpass > > > > ? > > You can't supply an *encrypted* pass; but then, you can't do this with > adduser, either. You *can* supply a cleartext password to pw(8), just > as Sheldon said, using the -h option: > > echo unf | pw useradd testuser -h 0 > > ..just tell it to read the password from fd 0 (stdin). And if you're really, really interested, I could give you a little patch I made some time ago, to add a -H encrypted pass option to pw(8), which should do exactly what you need :) G'luck, Peter -- I've heard that this sentence is a rumor. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message