Skip to content

Commit 85e97e1

Browse files
authored
add mysql_native_password plugin to authentication_string vs password
On a debian-11 server the plugin kept changing the password of a user. Turns out this user is using the plugin 'mysql_native_password', which does not use the PASSWORD field.
1 parent 857e1f0 commit 85e97e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/provider/mysql_user/mysql.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def self.instances
2727
@max_updates_per_hour, ssl_type, ssl_cipher, x509_issuer, x509_subject,
2828
@password, @plugin, @authentication_string = mysql_caller(query, 'regular').chomp.split(%r{\t})
2929
@tls_options = parse_tls_options(ssl_type, ssl_cipher, x509_issuer, x509_subject)
30-
if newer_than('mariadb' => '10.1.21') && @plugin == 'ed25519'
30+
if newer_than('mariadb' => '10.1.21') && (@plugin == 'ed25519' || @plugin == 'mysql_native_password')
3131
# Some auth plugins (e.g. ed25519) use authentication_string
3232
# to store password hash or auth information
3333
@password = @authentication_string

0 commit comments

Comments
 (0)