ya, and im giving you one
goto slackware.com or the gnu/gpl website and download the C source code for the "passwd" app, change that, then recompile it, set it up to accept a password being passed to it from a shell script
on your system you have an app in /usr/bin called "passwd", its written in C, its the app that adduser uses to accept and encrypt a password is that app
it will need to be rewritten as non interactive or your not gonna be able to use the shadowed and encrypted password system on linux