Ask Your Question
0

show user with role ?

asked 2016-04-11 01:02:27 -0500

blackwolf gravatar image

updated 2016-04-11 01:03:16 -0500

Hi all,

could you please tell me which command to show the user list with their role. i researched but only found user-list or role-list, not found the list that list up all user and role of each user.

thanks !

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-04-11 01:58:26 -0500

dbaxps gravatar image

updated 2016-04-11 02:50:13 -0500

Having openstack client installed ( yum install python-openstackclient ) tested on Mitaka :-
Fisrt created

[root@ip-192-169-142-127 ~(keystone_glance)]# cat keystonerc_glance
unset OS_SERVICE_TOKEN
export OS_USERNAME=glance
export OS_PASSWORD=f6a9398960534797
export OS_AUTH_URL=http://192.169.142.127:5000/v2.0
export PS1='[\u@\h \W(keystone_glance)]\$ '
export OS_TENANT_NAME=services
export OS_REGION_NAME=RegionOne

Then source credentials

[root@ip-192-169-142-127 ~(keystone_glance)]# openstack  user role list glance
+----------------------------------+---------------+----------+--------+
| ID                               | Name          | Project  | User   |
+----------------------------------+---------------+----------+--------+
| ae6999aeb9ec46f89234edc7ffeb53ed | admin         | services | glance |
| 99e21265b7ad4486b7a991ff0bcd2110 | ResellerAdmin | services | glance |
+----------------------------------+---------------+----------+--------+

I just added second role to glance to be able have swift as back end.
Another sample "john" has role "admin" in project "ostenant" , james doesn't
Looks like I have source john's credentials to get info about james's roles

[root@ip-192-169-142-127 ~(keystone_john)]# openstack  user role list john
+----------------------------------+-------+----------+------+
| ID                               | Name  | Project  | User |
+----------------------------------+-------+----------+------+
| ae6999aeb9ec46f89234edc7ffeb53ed | admin | ostenant | john |
+----------------------------------+-------+----------+------+
[root@ip-192-169-142-127 ~(keystone_john)]# openstack  user role list james
+----------------------------------+---------------+----------+-------+
| ID                               | Name          | Project  | User  |
+----------------------------------+---------------+----------+-------+
| 35a908c26ce34a63b4c48109e76eb89b | SwiftOperator | ostenant | james |
+----------------------------------+---------------+----------+-------+
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-04-11 01:02:27 -0500

Seen: 346 times

Last updated: Apr 11 '16