How to configure SSL on Webmin and reset Webmin user password

To configure SSL on Webmin, you will need your Webmin server SSL certificate (pem or crt), private key (key file) and root CA or intermediate CA certificate file. Once you have these, copy your root CA certificate file to /etc/webmin/ folder:

# cp ca.pem /etc/webmin/

Now the private key and the server SSL certificate need to be merged. The first in the chain is the key and then SSL certificate:

# cat rocket01.sefnet.net.key > miniserv2.pem

The next is the server SSL certificate:

# cat rocket01.sefnet.net.crt >> miniserv2.pem

Now move your new SSL certificate to Webmin folder:

# mv miniserv2.pem /etc/webmin/

Edit configuration file:

# vim /etc/webmin/miniserv.conf

And change the following line:

keyfile=/etc/webmin/miniserv2.pem

Add the following line to include your root CA or intermediate CA SSL certificate

extracas=/etc/webmin/ca.pem

Save and exit. Restart Webmin server:

# /etc/webmin/restart

To reset Webmin user password, do the following depending on your operating system:

RedHat distro (CentOS, Fedora, RedHat,Gentoo..)

# /usr/libexec/webmin/changepass.pl /etc/webmin admin NewPassword

Debian distro (Debian, Ubuntu..)

# /usr/share/webmin/changepass.pl /etc/webmin admin NewPassword

FreeBSD

# /usr/local/lib/webmin/changepass.pl /usr/local/etc/webmin admin NewPassword

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.