non-interactive password

Mikko Työläjärvi mbsd at pacbell.net
Sat Apr 24 18:52:48 PDT 2004


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.

    $.02,
    /Mikko


More information about the freebsd-questions mailing list