Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Sep 2001 19:49:35 -0700
From:      dannyman <dannyman@toldme.com>
To:        Sean Ellis <sellis@intergate.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: pw -h
Message-ID:  <20010914194935.F11099@toldme.com>
In-Reply-To: <20010914165301.A3127@telus.net>; from sellis@intergate.ca on Fri, Sep 14, 2001 at 04:53:01PM -0700
References:  <20010914165301.A3127@telus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010914194935.F11099>