Software Defined Networking
1753936 Members
10343 Online
108811 Solutions
New Discussion юеВ

Re: How do you add a new user to the controller? (2.4.5)

 
panluowei
Advisor

How do you add a new user to the controller? (2.4.5)

 
4 REPLIES 4
EricAtHP
Esteemed Contributor

Re: How do you add a new user to the controller? (2.4.5)

After a clean install of Keystone and the controller, there is a script that will create a user: sdn with a password: skyline.

 

sudo /opt/sdn/admin/config_local_keystone

 

Or here are some steps for the Icehouse build of keystone:

 

export OS_SERVICE_TOKEN=ADMIN
export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0
keystone user-create --name sdn
keystone role-create --name sdn-admin
keystone role-create --name sdn-user
keystone tenant-create --name sdn
keystone user-role-add --user <user-id> --role <role-id> --tenant_id <tenant-id>
keystone user-password-update --pass skyline <user-id>

 

To validate success:

keystone user-list
keystone role-list
keystone tenant-list
keystone user-role-list --user <user-id> --tenant <tenant-id>

panluowei
Advisor

Re: How do you add a new user to the controller? (2.4.5)

So can we add a second user so everyone doesn't share the same credentials? Something like...

 

export OS_SERVICE_TOKEN=ADMIN
export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0
keystone user-create --name otherguy
keystone user-role-add --user otherguy --role sdn-admin --tenant_id <tenant-id>
keystone user-password-update --pass otherskyline otherguy

 

 

 

EricAtHP
Esteemed Contributor

Re: How do you add a new user to the controller? (2.4.5)

Correct. You can create as many users as you like.

 

I would recommend that you have a dedicated installation of Keystone for the Controller(s) and not use it for anything else. I assume this is what you are doing anyway.

 

By the way, you only have to do the two Export commands once. You could add them as permanent environment variables or just enter them when you need to after loging into the system via the console or ssh.

 

And just to be clear, the <variable> fields need to be replaced by the actual alpha numeric string generated when you create a user, group, or tenant. It is a long string, maybe 30 characters or so.

panluowei
Advisor

Re: How do you add a new user to the controller? (2.4.5)

Thanks! That's exactly what I needed.