Openstack - Ubah Password Admin

Dari IGNwiki
Langsung ke: navigasi, cari

Ambil nilai token dari berkas keystone.conf

# 
grep admin_token /etc/keystone/keystone.conf

Misal:

#admin_token = <None>
admin_token = e2342e8246e14884b1ff4f141f820187

Ambil variabel OS_AUTH_URL dari keystonerc_admin

# 
cat keystonerc_admin 

Misal:

unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=rahasiaEuy
export OS_AUTH_URL=http://192.168.222.2:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

Buat berkas keystonerc_service_token

Untuk OS_SERVICE_ENDPOINT harus memakai port 35357 (non-public administrative traffic)

#
nano keystonerc_service_token

Isinya:

export OS_SERVICE_TOKEN=e2342e8246e14884b1ff4f141f820187
export OS_SERVICE_ENDPOINT=http://192.168.222.2:35357/v2.0/

Gunakan keystonerc_service_token sebagai source

#
source keystonerc_service_token

Lakukan penggantian password

Pertama melakukan penggantian password lalu melakukan unset untuk variabel

# 
keystone user-password-update admin

Muncul: (misal memakai password qwerty123)

New Password: qwerty123
Repeat New Password: qwerty123

Bersihkan variabel

unset OS_SERVICE_TOKEN
unset OS_SERVICE_ENDPOINT

Set ulang keystonerc_admin

Sesuaikan berkas keystonerc_admin agar memakai password qwerty123

# 
nano keystonerc_admin 

Misal:

unset OS_SERVICE_TOKEN
export OS_USERNAME=admin
export OS_PASSWORD=qwerty123
export OS_AUTH_URL=http://192.168.222.2:5000/v2.0
export PS1='[\u@\h \W(keystone_admin)]\$ '

export OS_TENANT_NAME=admin
export OS_REGION_NAME=RegionOne

Gunakan keystonerc_admin sebagai source

#
source keystonerc_admin

Tes

cara1:

[root@term-2 ~(keystone_admin)]# keystone user-list

cara2:

[root@term-2 ~(keystone_admin)]# openstack project list

cara3:

[root@term-2 ~(keystone_admin)]# openstack
(openstack) project list

cara4: Langsung dari terminal linux

#
openstack project list --os-username admin --os-project-name admin \
   --os-user-domain-id default --os-project-domain-id default \
   --os-identity-api-version 3 --os-auth-url http://localhost:5000 \
   --os-password qwerty123