[MDEV-13494] problem with MariaDB-Server 10.2 and security Created: 2017-08-10  Updated: 2017-08-10  Resolved: 2017-08-10

Status: Closed
Project: MariaDB Server
Component/s: Authentication and Privilege System, Plugin - unix_socket
Affects Version/s: 10.2
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Aurélien LEQUOY Assignee: Sergei Golubchik
Resolution: Not a Bug Votes: 0
Labels: tests


 Description   

I install Mariadb 10.2 (in non-interactive)

then i set password :

mysql -e "SET PASSWORD = password('$PASSWORD');"
 
/* i check it : */
MariaDB [(none)]> select user,host,password from mysql.user;
+------+-----------+-------------------------------------------+
| user | host      | password                                  |
+------+-----------+-------------------------------------------+
| root | localhost | *F7BFEC0021D40A226487B4644EEE5214D6EC9438 |
+------+-----------+-------------------------------------------+
1 row in set (0.00 sec)
MariaDB [(none)]> select current_user();
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.00 sec)

and I can still connect without password and mysql tell me than password here :

mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 5
Server version: 10.1.23-MariaDB-9+deb9u1 Debian 9.0
 
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
MariaDB [(none)]>

flush privileges; don't help.

I make it with grant :

mysql -e "GRANT ALL ON *.* TO root@'localhost' IDENTIFIED BY '$PASSWORD';"
root@esysteme3:~# mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

and now normal behavior



 Comments   
Comment by Aurélien LEQUOY [ 2017-08-10 ]

it's happen with 10.1 and 10.2

Comment by Sergei Golubchik [ 2017-08-10 ]

This is expected behavior. See what authentication plugin you're using and read the documentation for the unix_socket plugin.

Comment by Aurélien LEQUOY [ 2017-08-10 ]

i use same authentication plugin in both case.

ok, I understand what happen, have to test it grant make change about auth plugin.

Generated at Thu Feb 08 08:06:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.