We are trying to create users with a pre-created hashed password.
Ansible playbook logs this:
changed: [db29-acc] => (item=[{'name': 'ACC-clustercheck_user', 'password': '*96491C5DA6D86E34E644E89BC8B09A5B8C6D5D28', 'encrypted': True, 'priv': '*.*:PROCESS', 'state': 'present', 'append_privs': False}, 'localhost'])
As you can see: ‘encrypted’: True, so community.mysql is configured to set the password HASH. Alas it does not. I sets the password to “*96491C5DA6D86E34E644E89BC8B09A5B8C6D5D28” as text password, like this:
[root@db29-acc mysql]# mysql -uACC-clustercheck_user -p*96491C5DA6D86E34E644E89BC8B09A5B8C6D5D28
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 40913
Server version: 10.11.6-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> \s
--------------
mysql Ver 15.1 Distrib 10.11.6-MariaDB, for Linux (x86_64) using EditLine wrapper
Connection id: 40913
Current database:
Current user: ACC-clustercheck_user@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 10.11.6-MariaDB MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8mb3
Conn. characterset: utf8mb3
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 5 hours 5 min 7 sec
Threads: 10 Questions: 129853 Slow queries: 0 Opens: 62 Open tables: 52 Queries per second avg: 7.093
--------------
and using the actual password (that was used to create the hash on this very machine) does NOT work.
Hash was created like this:
MariaDB [(none)]> SELECT PASSWORD('acc_mysqlchk_user_pass');
+-------------------------------------------+
| PASSWORD('acc_mysqlchk_user_pass') |
+-------------------------------------------+
| *96491C5DA6D86E34E644E89BC8B09A5B8C6D5D28 |
+-------------------------------------------+
As we are rather new to ansible / community.mysql, we wonder if we are doing it wrong, or if there is a problem with community.mysql.
Feedback would be appreciated. More info available, if it would help.
This is recent ansible, btw:
ansible [core 2.17.6]
community.mysql 3.10.3
MariaDB 10.11.6
Alma 9.4