Generating MySQL 5.7 compatible (strong) password & discover old plaintext password?
Hello,
on outdated My$QL 5.5.6 and old WHM
i am wondering how (preferably via command line) i can
1. discover plaintext password of the mysql users (except by manually finding their appropriate php file where password is)?
2. generate strong password (compatible with the latest MySQL and with upcoming releases many years into future) and change MySQL password for the users
(i already know generating & change can be done via GUI, though i prefer command line way and also do not know what "Strength"(used by outdated WHM) is required in order new MySQL 5.6+ accept the password and do not reset it once i
-
you could go to phpmyadmin as root mysql>myql.user it will be quite obvious which users are using plain text passwords you could also export the SELECT user,password FROM mysql.user; command to a file and sort it all the hashed passwords will have a * 0 -
Hi @postcd Something like the following might work to get you the old password style users: [root@server ~]# mysql MariaDB [(none)]> use mysql MariaDB [mysql]> select user,password from user where length(password) < 41;
MySQL passwords are not stored in plaintext and really you shouldn't even need to know them in order to change them. You could then use the UAPI for those users to set their password: UAPI Functions - Mysql::set_password - Developer Documentation - cPanel Documentation This won't let you set a password that doesn't meet the minimum strength requirements for MySQL0
Please sign in to leave a comment.
Comments
2 comments