Dec
8
Change password without prompts from command line
I found this while surfing. I think it only works on RedHat Linuxes and their progeny. And of course, you need to be root. This is nice for adding a user and password from a script.
echo 'NewSecretPassword' | passwd --stdin someuser
This sets the password for ‘someuser’ to ‘NewSecretPassword’