Ask Your Question
1

Admin password from create server api response is not working

asked 2014-06-16 09:38:02 -0500

Guru gravatar image

updated 2014-06-16 09:39:22 -0500

Hi,

I'm using Create Server Api (http://docs.openstack.org/api/openstack-compute/2/content/POST_createServer__v2__tenant_id__servers_CreateServers.html) to create an instance. This api creates the instance successfully, and returns the response as below :

{ "server": { "security_groups": [ { "name": "default" } ], "OS-DCF:diskConfig": "MANUAL", "id": "c6d04159-9bfc-4ab8-823d-0d5ca2abe152", "links": [ { "href": "http://166.78.46.130:8774/v2/4fd44f30292945e481c7b8a0c8908869/servers/c6d04159-9bfc-4ab8-823d-0d5ca2abe152", "rel": "self" }, { "href": "http://166.78.46.130:8774/4fd44f30292945e481c7b8a0c8908869/servers/c6d04159-9bfc-4ab8-823d-0d5ca2abe152", "rel": "bookmark" } ], "adminPass": "aabbccddeeff" } }

In response, we recieve a password as adminPass. I tried logging into the instance from console using that password, but none of the username like admin,root or server name works. So I'm unable to log into the instance.

Can anyone please help me with which username to be used?

Advance thanks for any help provided.

Thank You, Guru Prasad.K.V

edit retag flag offensive close merge delete

Comments

Just because the api generates an admin password does not mean that the instance you are booting is going to take advantage of that password. What operating system are you booting? If Linux, which distribution?

larsks gravatar imagelarsks ( 2014-06-16 16:53:56 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-06-19 18:26:31 -0500

larsks gravatar image

I don't believe cloud-init, the tool that Ubuntu and other distributions use to configure instances from OpenStack metadata, has any support for adminPass. What cloud-init does is read the ssh key you provided when you booted the instance and provisions that into the ubuntu user account (for Ubuntu; cloud-user or ec2-user for various CentOS/Fedora/RedHat versions).

If you have properly configured an ssh key when booting your instance, you should then be able to:

ssh ubuntu@your.instance.ip

And have access without a password. From this account you can use sudo to gain root privileges.

edit flag offensive delete link more
0

answered 2014-06-17 01:41:57 -0500

Guru gravatar image

Hi Larsks,

Im using Ubuntu Ubuntu 12.04.4 LTS, 64 bit and Openstack 2013.2.2 i.e Havana.

Thank You, Guru Prasad.K.V

edit flag offensive delete link more

Comments

(For future reference: this should be a comment on your question, not an "answer").

larsks gravatar imagelarsks ( 2014-06-19 18:27:02 -0500 )edit

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

2 followers

Stats

Asked: 2014-06-16 09:38:02 -0500

Seen: 512 times

Last updated: Jun 19 '14