Script to help reset the da_admin password

Version 1.61.4

Feature
Finished

Proposed script: /usr/local/directadmin/scripts/reset_da_admin_password.sh Usage: reset_da_admin_password.sh --stdin - the password will be passed on stdin reset_da_admin_password.sh --random - pick a new random password reset_da_admin_password.sh --password='newpass' reset_da_admin_password.sh - this help page The script should attempt to use the mysql= value from the setup.txt if it exists, (else use current da_admin user/pass), and make an attempt to connect, taking into account the host value, if exist in the mysql.conf NOTE: it currently only support localhost resets If it's able to connect, change the password normally via mysql call, and update the mysql.conf and my.cnf. TODO: If it's not able to connect, attempt to shut down mysqld, and restart it with the --skip-grant-tables, as per guide: https://help.directadmin.com/item.php?id=45 and again, reset the da_admin pass, followed by restarted mysqld back into normal mode. After setting the password, also udpate the mysql.conf my.cnf. ===== API Should the script be successful, a possible API call may be added to call the script through 2222. To be determined. ---- T24253

Interested to try DirectAdmin? Get a 30-day Free Trial!