mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-08-03 12:44:25 -07:00
MySLQ is using identified with auth_pam by ... instead of identified with pam using ... like mariadb does
This commit is contained in:
parent
73f200bf4b
commit
1df6442b81
2 changed files with 5 additions and 5 deletions
|
@ -170,8 +170,8 @@ def user_add(cursor, user, host, host_all, password, encrypted,
|
|||
elif plugin and plugin_hash_string:
|
||||
query_with_args = "CREATE USER %s@%s IDENTIFIED WITH %s AS %s", (user, host, plugin, plugin_hash_string)
|
||||
elif plugin and plugin_auth_string:
|
||||
# Mysql and MariaDB differ in naming pam plugin
|
||||
if plugin == 'pam' or plugin == 'auth_pam':
|
||||
# Mysql and MariaDB differ in naming pam plugin and Syntax to set it
|
||||
if plugin == 'pam':
|
||||
query_with_args = "CREATE USER %s@%s IDENTIFIED WITH %s USING %s", (user, host, plugin, plugin_auth_string)
|
||||
else:
|
||||
query_with_args = "CREATE USER %s@%s IDENTIFIED WITH %s BY %s", (user, host, plugin, plugin_auth_string)
|
||||
|
@ -309,8 +309,8 @@ def user_mod(cursor, user, host, host_all, password, encrypted,
|
|||
if plugin_hash_string:
|
||||
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s AS %s", (user, host, plugin, plugin_hash_string)
|
||||
elif plugin_auth_string:
|
||||
# Mysql and MariaDB differ in naming pam plugin
|
||||
if plugin == 'pam' or plugin == 'auth_pam':
|
||||
# Mysql and MariaDB differ in naming pam plugin and syntax to set it
|
||||
if plugin == 'pam':
|
||||
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s USING %s", (user, host, plugin, plugin_auth_string)
|
||||
else:
|
||||
query_with_args = "ALTER USER %s@%s IDENTIFIED WITH %s BY %s", (user, host, plugin, plugin_auth_string)
|
||||
|
|
|
@ -138,7 +138,7 @@ options:
|
|||
plugin_auth_string:
|
||||
description:
|
||||
- User's plugin auth_string (``CREATE USER user IDENTIFIED WITH plugin BY plugin_auth_string``).
|
||||
- If I(plugin) is ``pam`` or ``auth_pam`` I(plugin_auth_string) can be used to determine the pam service (``CREATE USER user IDENTIFIED WITH plugin USING plugin_auth_string``).
|
||||
- MariaDB: If I(plugin) is ``pam`` an optional I(plugin_auth_string) ults in (``CREATE USER user IDENTIFIED WITH plugin USING plugin_auth_string``).
|
||||
This was chosen because MySQL and MariaDB store the ``USING plugin_auth_string`` part in the ``authentication_string`` column in ``mysql.user``.
|
||||
type: str
|
||||
version_added: '0.1.0'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue