Maria DB: Failed to save user

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.2
Webmin version 2.303

Seems that the latest version of Webmin has a bug?

Steps: When going to Webmin > Servers > Maria DB Server > User Permissions and either create or edit a user and change the password. On save, I am getting the below error… This worked fine prior to Webmin 2.302. But is happening for me on 2.303.

Failed to save user : SQL alter user ‘theuser’@‘%’ identified with mysql_native_password by ‘XXXX’ failed : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘by ‘XXXX’’ at line 1

I did see a previous post similar, but was noted as resolved. Not sure if this regressed back in after 2.303 update?

Hello,

Thanks for reporting this!

@tzohosting This is actually a new bug! To resolve this set “Authentication type” to “Default” when saving MySQL/MariaDB user.

@Jamie, you made this change recently—do you know what’s going on here?

@Ilia That did indeed allow me to save the password. Appreciate the work around.

@Ilia is there a specific commit you’re referring to here?

Yeah, check this one out:

@Jamie, alright, I actually dug into it and found quite a few issues in my old code—your change just happened to bring them to light.

However, there are more issues related to the auth plugins listing in your earlier linked change, and I’ll send you a PR to handle it properly depending on the system.

@tzohosting You can apply the following patch and see how it works for you:

webmin patch https://github.com/webmin/webmin/commit/6905548