GNU this is from the webmin website.
Hope it helps
How do I change my Webmin password if I can't login?
Included with the Webmin distribution is a program called changepass.pl to solve precisely this problem. Assuming you have installed Webmin in /usr/local/webmin-0.91, you could change the password of the admin user to foo by running
/usr/local/webmin-0.91/changepass.pl /etc/webmin admin foo