How to reset Webmin root password?

At times we often forget the webmin password for a given user, say root, or after repeated failed login attempts webmin locks the account and one cannot login anymore. In this case you need to wait for couple, three minutes and you will be able to try to login again. However, if you've forgotten your password and need to change it, then login to the server via ssh and run the following command:

For RHEL/CentOS:

/usr/libexec/webmin/changepass.pl /etc/webmin root NEWPASSWORD 

For Debian/Ubuntu

/usr/share/webmin/changepass.pl /etc/webmin root NEWPASSWORD

Now go back to browser and try to login with the new password, it should work.

Comments

-bash:

-bash: /usr/libexec/webmin/changepass.pl: No such file or directory
-bash: bh3: command not found

Try: /usr/share/webmin/change

Try:
/usr/share/webmin/changepass.pl /etc/webmin root NEWPASSWORD

the latter of the 2 worked

the latter of the 2 worked for me and thank you poster as i had searched for it for a decent amount of time and couldnt get it figured out

updatedb && locate

updatedb && locate changepass.pl
grab the path and execute

Thank you for the tip, much

Thank you for the tip, much appreciated. Worked for Ubuntu server.

A million thanks to you.

A million thanks to you.

This worked - where the

This worked - where the Webming website tutorial didn't, so thank you very much. It really helps.

Post new comment

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
To prevent automated spam submissions leave this field empty.