Resetting Webmin password for Ubuntu

The inevitable happened: I forgot the password for Webmin on one of my Ubuntu servers.  In my defence, it is a server that I principally manage via SSH.  Being Ubuntu, the necessary files are not in the same place as Webmin documentation.  However, a quick Google search found a blog post with the solution.  For my own records, I am duplicating below:

  1. Open a shell or SSH session on the target server
  2. Enter the command
    • /usr/share/webmin/ /etc/webmin username password
    • Where username = webmin username.  For me this was root
    • And password = new password.
  3. Login to Webmin to test

Thanks to and original information from

Given the number of password I seemingly have to remember, I think it is time that I employed some for of Password Safe.

Reset Webmin Password for ubuntu

13 Votes

I found this problem at the first time when webmin installed. Also this happens to everyone at one time or another. You go on vacation and when you come back, you forget all of the passwords on your computer.

I failed logging in several times and then Webmin blocked my IP. Getting localhost blocked isn’t a good thing to see. So I searched the Internet for a way to reset the password and I found this procedure:

1. Login to your computer as root. Type on browser address bar https://localhost:10000/
2. If you are running a Debian distribution (ubuntu), enter the following command:
/usr/share/webmin/ /etc/webmin username password
3. Login to Webmin with your reset password.
4. eNjoY!

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.