3.9. Create a Regular User Account
Executing the following procedure will result in the creation of a regular user and tenant, and associating that user with Identity's default
_member_ role.
The steps listed in this procedure must be performed while logged in to the system hosting the Identity service as a user that has access to a file containing the administration token.
Procedure 3.11. Creating a regular user account
- Load identity credentials from the
~/keystonerc_adminfile that was generated when the administrative user was created:#source ~/keystonerc_admin - Use the
keystone user-createto create a regular user:#keystone user-create --name USER --pass PASSWORD+----------+-----------------------------------+ | Property | Value | +----------+-----------------------------------+ | email | | | enabled | True | | id | b8275d7494dd4c9cb3f69967a11f9765 | | name | USER | | tenantId | | +----------+-----------------------------------+Replace USER with the user name that you would like to use for the account. Replace PASSWORD with a secure password for the account. - Use the
keystone tenant-createcommand to create a tenant:#keystone tenant-create --name TENANT+-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | | | enabled | True | | id | 6f8e3e36c4194b86b9a9b55d4b722af3 | | name | TENANT | +-------------+----------------------------------+Replace TENANT with the name that you wish to give to the tenant. - Now that the user account and tenant have been created, the relationship between them and the default
_member_role must be explicitly defined using thekeystone user-role-addcommand:#keystone user-role-add --user USER --role _member_ --tenant TENANTwhere:- USER is the same user name specified earlier during user creation.
- TENANT is the same tenant name specified earlier during tenant creation.
- To facilitate authentication, create a
keystonerc_userfile in a secure location (for example, the home directory of therootuser).Set these environment variables that will be used for authentication:export OS_USERNAME=USER export OS_TENANT_NAME=TENANT export OS_PASSWORD=PASSWORD export OS_AUTH_URL=http://IP:5000/v2.0/ export PS1='[\u@\h \W(keystone_user)]\$ '
where:- PASSWORD is the same password specified earlier during user creation.
- IP is the IP address or host name of the Identity server.
A regular user account and tenant have been defined in the Identity server, and associated with the default
_member_ role. A keystonerc_user file has also been created for authenticating as the created user.