non-interactive password

Louis LeBlanc freebsd at keyslapper.org
Fri Apr 30 06:41:21 PDT 2004


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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 
> 

-- 
Louis LeBlanc               leblanc at 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


More information about the freebsd-questions mailing list