此内容没有您所选择的语言版本。

3.6. Create a Regular User Account


Create a regular user and tenant. Tenants are used to aggregate service resources, and are also known as projects.
All steps in this procedure must be performed on the system hosting the Identity service.

Procedure 3.10. Creating a Regular User Account

  1. Set up the shell to access keystone as the administrative user:
    # source ~/keystonerc_admin
  2. Create a tenant:
    [(keystone_admin)]# openstack project create TENANT
    +-------------+----------------------------------+
    | Field       | Value                            |
    +-------------+----------------------------------+
    | description | None                             |
    | enabled     | True                             |
    | id          | 99c674e3fead4237ace2a0d86dab76e4 |
    | name        | TENANT                           |
    +-------------+----------------------------------+
    Replace TENANT with a name for the tenant.
  3. Create a regular user:
    [(keystone_admin)]# openstack user create --project TENANT --password PASSWORD USER
    +------------+----------------------------------+
    | Field      | Value                            |
    +------------+----------------------------------+
    | email      | None                             |
    | enabled    | True                             |
    | id         | 246b1342a8684bf39d7cc5165ef835d4 |
    | name       | USER                             |
    | project_id | 99c674e3fead4237ace2a0d86dab76e4 |
    | username   | USER                             |
    +------------+----------------------------------+
    Replace USER with a user name for the account. Replace TENANT with the tenant name that you used in the previous step. Replace PASSWORD with a secure password for the account.

    Note

    The user is associated with Identity's default _member_ role automatically thanks to the --project option.
  4. To facilitate authentication, create a keystonerc_user file in a secure location (for example, the home directory of the root user).
    Set the following environment variables to be used for authentication:
    export OS_USERNAME=USER
    export OS_PROJECT_NAME=TENANT
    export OS_PASSWORD=PASSWORD
    export OS_AUTH_URL=http://IP:5000/v2.0/
    export PS1='[\u@\h \W(keystone_user)]\$ '
    Replace USER, TENANT, and PASSWORD with the values specified during tenant and user creation. Replace IP with the IP address or host name of the Identity server.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.