Webmin provides a perl script for this, keep in mind, the path may vary:


/usr/libexec/webmin/changepass.pl /etc/webmin <user> <password>