How to reset Webmin root password?

EDIT: Since Webmin 1.974+ you can just:


webmin passwd username

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

For Thecus NAS


alias webmin-pass='/raid0/data/module/WebMin/sys/bin/changepass.pl /raid0/data/module/WebMin/sys/etc/webmin admin'
alias webmin-restart='/raid0/data/module/cfg/module.rc/WebMin.rc stop | /raid0/data/module/cfg/module.rc/WebMin.rc start'

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

Comments

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

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

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

yes this is worked in my ubuntu 18.04

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

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

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

A million thanks to you.

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

Thkz. Work perfect on Centos

Thankyou this work!!!

For Arch Linux:

/opt/webmin/changepass.pl /etc/webmin/ root NEWPASSWORD

how to reset webmin password. i forgot what i have changed. and iam not from IT background. i ahve taken google cloud, created webmin, changed the password from webmin, but forgot now how to rest it. how should i open my webmin again.

this did not work for me - forum.virtualmin.com/t/odd-issue-with-solution-with-rocky-linux/110863/4

response:

This issue has been resolved for Webmin 1.974+. We added a new webmin command called passwd, which enables you to change Webmin user password from any location by running:

webmin passwd username

The new Webmin command worked perfectly.

Add new comment

Filtered HTML

  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.