- Check the parameter "failed_auth_count" in the database.
root@photon-machine [ ~ ]# osctl exec -ti exampledb-server-0 -- mysql --defaults-file=/etc/mysql/admin_user.cnf
MariaDB [(none)]> use keystone;exampleDB [keystone]> select * from local_user where name='admin'\G
*************************** 1. row ***************************
id: 6
user_id: ########################
domain_id: default
name: admin
failed_auth_count: 0
failed_auth_at: NULL
1 row in set (0.00 sec)
MariaDB [keystone]>
- If the parameter failed_auth_count is not 0, the account is locked. We need to set user failure count=0,
Note: the user_id is your locked admin user id.
MariaDB [keystone]> UPDATE local_user SET failed_auth_count = "0" and
failed_auth_at = 'NULL' WHERE user_id = '########################';
- Check password status for admin user, note the local_user_id is the admin user "id" in local_user table,
exampleDB [keystone]> select * from password WHERE local_user_id='6'\G
*************************** 1. row ***************************
id: 6
local_user_id: 6
expires_at: NULL
self_service: 0
password_hash: #####################################################
created_at_int: 1591496590474690
expires_at_int: NULL
created_at: 2020-06-07 02:23:10
1 row in set (0.00 sec
- Ensure that the latest password for the admin user never expires. Update the keystone table with below command:
exampleDB [keystone]>
UPDATE password SET expires_at = 'NULL' and expires_at_int = 'NULL' id =
'${the_latest_password_record_id}';
Login to toolbox pod and try some openstack commands with the admin user account.