If you just forgot our webmin admin password and failed to logging to your webmin account and after several tries your Webmin blocked your IP you need to follow following steps to reset your webmin admin/root/master password:-
- Login to your box as root.
- If you are running a RedHat distribution (i.e. Fedora, CentOS, Gentoo), enter the following
1 | /usr/libexec/webmin/changepass.pl /etc/webmin <strong>username password</strong> |
If you are running a Debian distribution, enter the following command:
1 | /usr/share/webmin/changepass.pl /etc/webmin <strong>username password |
-
You are almost done.
- Now you can Login to Webmin with your new password you just reset.
Lost MySQL root password Recovery
2 | mysqld_safe --skip-grant-tables & |
This stops MySQL and reloads it without the authentication (grant) tables, so we can connect to MySQL without a password. Beware this locks out all of your applications until the password reset process is completed. Now we need to go in an reset the password
It will prompt you for a password, just hit enter. You should now be inside the MySQL terminal and ready to change the root password:
1 | update user set password=PASSWORD(”NEW-PASSWORD”) where User=’root’; |
Of course, replace NEW-PASSWORD with your chosen root password. Now all that remains is to restart MySQL in the normal manner in order for it to pick up the authentication tables correctly and let your customers and applications back in