While playing around with my OpenStack Icehouse installation today, I went ahead and changed the password for the admin user via WebUI (Horizon). After, I logged into the CLI and tried to run some commands got an error saying Error: Invalid OpenStack Nova credentials
[root@jschwoebel ~]# source keystonerc_admin [root@jschwoebel ~(keystone_admin)]# nova list ERROR: Invalid OpenStack Nova credentials. [root@jschwoebel ~(keystone_admin)]# cinder list ERROR: Invalid OpenStack Cinder credentials.
After some troubleshooting, I realized that when changing the password via the Horizon, the keystonerc_admin file doesn’t automatically get updated and you have to do it manually.
Below are the steps for changing the admin password in OpenStack Icehouse:
1. Change the admin password in Horizon
On the CLI:
1. Verify that the ~/keystonerc_admin file is still showing your old password
[root@jschwoebel ~(keystone_admin)]# cat keystonerc_admin export OS_USERNAME=admin export OS_TENANT_NAME=admin export OS_PASSWORD=demo export OS_AUTH_URL=http://10.66.32.196:5000/v2.0/ export PS1='[\u@\h \W(keystone_admin)]\$ '
2. Modify ~/keystonerc_admin and change OS_PASSWORD to the new password
3. Confirm that the OS_PASSWORD has been changed
[root@jschwoebel ~(keystone_admin)]# cat keystonerc_admin
export OS_USERNAME=admin export OS_TENANT_NAME=admin export OS_PASSWORD=demo1 export OS_AUTH_URL=http://10.66.32.196:5000/v2.0/ export PS1='[\u@\h \W(keystone_admin)]\$ '
4. Source ~/keystonerc_admin again
[root@jschwoebel ~(keystone_admin)]# source keystonerc_admin
5. Test any OpenStack specific command
[root@jschwoebel ~(keystone_admin)]# nova list +--------------------------------------+---------------------------------------------+--------+------------+-------------+---------------------+ | ID | Name | Status | Task State | Power State | Networks | +--------------------------------------+---------------------------------------------+--------+------------+-------------+---------------------+ | 3aa85e86-efe0-419b-bec0-2f23549cc51d | lee-01-3aa85e86-efe0-419b-bec0-2f23549cc51d | ACTIVE | - | Running | public=172.24.4.228 | | 8788da47-f4da-46a2-a1fe-25b242961d12 | lee-01-8788da47-f4da-46a2-a1fe-25b242961d12 | ACTIVE | - | Running | public=172.24.4.229 | | 9b0d741e-da3d-4c3b-bb9d-db810557096e | lee-03 | ACTIVE | - | Running | public=172.24.4.231 | | 9a5ef03f-c644-409a-aa8f-e9c306f5139c | lee-04 | ACTIVE | - | Running | public=172.24.4.233 | | a160bee3-e686-4682-8593-164eebe0b5d4 | lee-05 | ACTIVE | - | Running | public=172.24.4.235 | | aa232eb4-aef4-4b06-8196-6221f7f3bd73 | whatever | ACTIVE | - | Running | public=172.24.4.237 | | f2e4fff3-2622-4b1a-a091-b4230e414f91 | yeah | ACTIVE | - | Running | public=172.24.4.227 | +--------------------------------------+---------------------------------------------+--------+------------+-------------+---------------------+ [root@jschwoebel ~(keystone_admin)]# cinder list +--------------------------------------+-----------+--------------------+------+-------------+----------+--------------------------------------+ | ID | Status | Display Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+-----------+--------------------+------+-------------+----------+--------------------------------------+ | 0cfddbf5-4dcf-4cb6-9332-c37e167e2861 | in-use | | 1 | None | true | 9a5ef03f-c644-409a-aa8f-e9c306f5139c |