Ask Your Question

add project_id to a user_id

asked 2014-03-24 09:09:52 -0500

Lokesh gravatar image

Hi ,

     May i know how can i relate the project_id to the user . I.e how can add project_id for a particular user .

The issue is i need to create a unique project_id for every user . Can anyone please help me out in this issue .

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-03-24 10:21:14 -0500

larsks gravatar image

When you first create a user, you specify a primary project for that user:

keystone tenant-create --name myproject
keystone user-create --name myuser --tenant myproject

If you late on want to add that user to another project, you can use the user-role-add command to give the user a role in another project:

keystone tenant-create --name anotherproject
keystone user-role-add --user myuser --role _member_ --tenant anotherproject

Now user myuser is a member of multiple projects.

edit flag offensive delete link more


The second example in this answer (using user-role-add) is how you map a user to another project. If you are trying to do something other than that, please update your question to show an explicit example of what you want.

larsks gravatar imagelarsks ( 2014-04-14 10:43:13 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-03-24 09:09:52 -0500

Seen: 121 times

Last updated: Apr 14 '14