[MDEV-22418] mysqladmin wrong error with simple_password_check Created: 2020-04-29  Updated: 2023-10-06  Resolved: 2023-10-06

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3

Type: Bug Priority: Minor
Reporter: MG Assignee: Daniel Black
Resolution: Fixed Votes: 0
Labels: None


 Description   

If you try too simple a password with mysqladmin, you get the wrong error message:

[root@mg-m103 ~]# mysqladmin password -p
Enter password:
New password:
Confirm new password:
[root@mg-m103 ~]#

[root@mg-m103 ~]# mysql -Ap <<< "INSTALL SONAME 'simple_password_check'"
Enter password:
[root@mg-m103 ~]# mysqladmin password -p
Enter password:
New password:
Confirm new password:
mysqladmin:
You cannot use 'password' command as mysqld runs
with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead

The server sends the correct message:

recvfrom(3, "w\0\0\1\377\n\5#HY000The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement", 16384, MSG_DONTWAIT, NULL, NULL) = 123



 Comments   
Comment by Elena Stepanova [ 2020-05-04 ]

Thanks for the report. Reproducible as described on all of 10.1-10.5.

install soname 'simple_password_check';
 
--exec $MYSQLADMIN -uroot password foo
 
--echo # All done

10.5 f544a712

install soname 'simple_password_check';
bug.t                                    [ fail ]
        Test ended at 2020-05-05 02:32:26
 
CURRENT_TEST: bug.t
/data/bld/10.5-debug/bin/mysqladmin: 
You cannot use 'password' command as mysqld runs
 with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead
mysqltest: At line 3: exec of '/data/bld/10.5-debug/bin/mysqladmin --defaults-file=/data/bld/10.5-debug/mysql-test/var/my.cnf -uroot password foo' failed, error: 65280, status: 255, errno: 11
Output from before failure:
install soname 'simple_password_check';

Generated at Thu Feb 08 09:14:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.