Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Apr 2004 09:40:53 -0400
From:      Louis LeBlanc <freebsd@keyslapper.org>
To:        freebsd-questions@FreeBSD.org
Subject:   Re: non-interactive password
Message-ID:  <20040430134053.GA5824@keyslapper.org>
In-Reply-To: <4091FD1A.3000203@circlesquared.com>
References:  <20040424232033.GA53918@keyslapper.org> <20040424184957.I57098@sotec.home> <20040429193544.GH419@keyslapper.org> <40915E84.9040106@potentialtech.com> <4091FD1A.3000203@circlesquared.com>

next in thread | previous in thread | raw e-mail | index | archive | help
That's the one!

Thanks a million!

Lou
On 04/30/04 08:15 AM, Peter Risdon sat at the `puter and typed:
> Bill Moran wrote:
> 
> > Louis LeBlanc wrote:
> >
> >> On 04/24/04 06:52 PM, Mikko Työläjärvi sat at the `puter and typed:
> >>
> >>> On Sat, 24 Apr 2004, Louis LeBlanc wrote:
> >>>
> >>>> Hey everyone.  I'm trying to recreate a password script that sets
> >>>> passwords (as root on the local system only).  The trick is that it
> >>>> must change the password non-interactively.  I had this working, but
> >>>> when the system was trashed, the script was lost.
> >>>>
> >>>> Can someone refresh my memory on the command format?
> >>>
> >>>
> >>>  echo "$password" | pw usermod "$user" -h0
> >>>
> >>> Might do the trick.
> >>
> >>
> >> 'fraid not.  It fails quietly, but it fails.
> >>
> >> Thanks anyway.
> >
> >
> > The man page for pw says that pw needs a file descriptor to set the
> > password via -h
> 
> 
> I have a similar script that modifies passwords like this, where $3 is 
> the password and $1 is the username:
> 
> echo "$3" | pw usermod $1 -h 0
> 
> PWR.
> _______________________________________________
> 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"
> 
> 

-- 
Louis LeBlanc               leblanc@keyslapper.org
Fully Funded Hobbyist, KeySlapper Extrordinaire :)
http://www.keyslapper.org                     Ô¿Ô¬

By trying we can easily learn to endure adversity.  Another man's, I mean.
    -- Mark Twain



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