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

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

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

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.
To