From owner-freebsd-questions Fri Sep 14 19:48:50 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dell.dannyland.org (dsl092-007-150.sfo1.dsl.speakeasy.net [66.92.7.150]) by hub.freebsd.org (Postfix) with ESMTP id DC3EA37B410 for ; Fri, 14 Sep 2001 19:48:47 -0700 (PDT) Received: by dell.dannyland.org (Postfix, from userid 1001) id B9B1F5C85; Fri, 14 Sep 2001 19:49:35 -0700 (PDT) Date: Fri, 14 Sep 2001 19:49:35 -0700 From: dannyman To: Sean Ellis Cc: freebsd-questions@freebsd.org Subject: Re: pw -h Message-ID: <20010914194935.F11099@toldme.com> References: <20010914165301.A3127@telus.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010914165301.A3127@telus.net>; from sellis@intergate.ca on Fri, Sep 14, 2001 at 04:53:01PM -0700 X-Loop: djhoward@uiuc.edu Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Sep 14, 2001 at 04:53:01PM -0700, Sean Ellis wrote: > Hello, > > I'm looking to give a list of users passwords from a second list via > a shell script, with no success. I thought this would work, > > #!/usr/local/bin/bash > > exec 6<&0 > exec < pasz > > for i in `cat users` > do > cat | pw usermod -n $i -h 0 > done > > but this gives: > > pw: empty password read on file descriptor 0 What are you trying to set the passwords to? You want like: echo "foo" | pw usermod -n $i -h 0 Or: cat `$i.passwd` | pw usermod -n $i -h 0 -danny To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message