next up previous contents
Next: 環境腳本 Up: Keystone Previous: 產生 domains, projects, users,   Contents

驗證

  1. 先取消變數 OS_AUTH_URL OS_PASSWORD
    [root@ip112 ~]# unset OS_AUTH_URL OS_PASSWORD
    
  2. 使用 admin 用戶取得認證令牌,輸入密碼後取得。
    [root@ip112 ~]# openstack --os-auth-url http://controller:35357/v3 \
    --os-project-domain-name Default --os-user-domain-name Default \
    --os-project-name admin --os-username admin token issue
    Password: 
    +------------+------------------------------------------------+
    | Field      | Value                                          |
    +------------+------------------------------------------------+
    | expires    | 2018-05-24T01:06:41+0000                       |
    | id         | gAAAAABbBgIReI4Wvh.......8cqOMRgXJwapvudJix-L4 |
    | project_id | e28adc716118434c96b5833867faa08c               |
    | user_id    | c5f79bab788049e7a59395b6f94a911f               |
    +------------+------------------------------------------------+
    
  3. 使用 demo 用戶取得認證令牌,輸入密碼後取得。
    [root@ip112 ~]# openstack --os-auth-url http://controller:5000/v3 \
    --os-project-domain-name Default --os-user-domain-name Default \
    --os-project-name demo --os-username demo token issue
    Password: 
    +------------+------------------------------------------------+
    | Field      | Value                                          |
    +------------+------------------------------------------------+
    | expires    | 2018-05-24T01:11:44+0000                       |
    | id         | gAAAAABbBgNAchJ1wMNWybT-7PcSkoIbJ7pKZkm27ao3s8 |
    | project_id | 92d1ec3e04384ad599c1a8f5aed73663               |
    | user_id    | 0d7bb3820384452abb97ec0b40c445b1               |
    +------------+------------------------------------------------+
    



2018-09-19