Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Apr 2007 14:41:31 -0300
From:      Agus <agus.262@gmail.com>
To:        Vince <jhary@unsane.co.uk>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Non Interactive passwd change via script....
Message-ID:  <fda61bb50704041041jf5955f6he22a3bf96ddaf9ac@mail.gmail.com>
In-Reply-To: <4613B91B.5000104@unsane.co.uk>
References:  <fda61bb50704031557s19cec5ccw4cdb10265aa8b6c4@mail.gmail.com> <4612E800.3010408@daleco.biz> <fda61bb50704031714w7e7eb78cg9a2a7d05ae284952@mail.gmail.com> <4612F4BA.3030704@daleco.biz> <fda61bb50704040644u571918e0m7871d760907bd318@mail.gmail.com> <4613B91B.5000104@unsane.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
2007/4/4, Vince <jhary@unsane.co.uk>:
>
> Agus wrote:
> <snip>
>
> >
> >
> > OK..thanks for the heads up about responding....
> >
> > The problem isnt adding the user....i ve done that......the problem is
> > creating the password for the user as i tried to say in the first
> email...
> >
> Assuming you dont mean actually generating the password maybe you need the
>   -h fd
> flag to pw
> or more specificly (from the manpage)
> pw will prompt for the user's password if -h 0 is given,
> nominating stdin as the file descriptor on which to read
> the password.  Note that this password will be read only
> once and is intended for use by a script rather than for
> interactive use.
>
> so something like
> echo PASSWD | pw add user wibble -h 0
> will create a user wibble with password of PASSWD
>
> or
> echo $PASSWORD | pw add user $USERNAME -h 0
> setting $PASSWORD and $USERNAME as needed.
>
> Vince
>
>
>
> > thanks kevin,
> > _______________________________________________
> > 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"
>
>
Thanks Vince, that was exactly what i was looking for.....i read the man
page and saw the -h or th -H ir it is encrypted.....but i copuldnt make it
work, didnt know how....
your example lightens up everything....greatttt

thanks alot....
i will try it as sonn as i get home...

thanksss



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