[one-users] Opennebula template Push root password.

Jaime Melis jmelis at opennebula.org
Wed Apr 2 08:10:55 PDT 2014


Hi Leszek,

I don't understand either why it's not working for you then, the only
explanation is that the image is not correct. Could you try with another
image? I think that would the easiest option.

Another option would be to open that image and replace the root password
manually. To do so, this is what I usually do:

1) figure out the start of the partition:
$ OFFSET=$(parted /path/to/image 'unit B print' 2>/dev/null | awk
'{if($1=="1"){print $2}}'|tr -cd 0-9)

2) mount the image:
$ mkdir -p mnt
$ sudo mount -o loop,offset=$OFFSET mnt

3) generate the hashed password
$ openssl passwd -1 <newpass>
$1$pkKjWlHt$2Qe6M8C6hDJ.XOG2qAmXs.

4) edit mnt/etc/shadow and replace replace the root:......: part of that
file with the new generated password, like such:
root:$1$pkKjWlHt$2Qe6M8C6hDJ.XOG2qAmXs.:16041:0:99999:7:::

5) unmount the image: sudo umount mnt

although to be honest another image might be a better bet. Did you get this
one from the marketplace?


On Wed, Apr 2, 2014 at 4:33 PM, Leszek Master <keksior at gmail.com> wrote:

> i'm trying to ssh from node-02 using leni account (leni at node-02) as in
> the ssh-key added to template. And i've got password prompt, the same is
> when i use ssh root at 172.100.0.109 - password prompt. It should but it
> isn't :(
>
>
> 2014-04-02 16:29 GMT+02:00 Jaime Melis <jmelis at opennebula.org>:
>
> That should work. Just so we're clear, you're trying to ssh from the
>> oneadmin account in node02 to the *root* account of the VM:
>>
>> oneadmin at node-02:~ $ ssh root at 172.100.0.109
>>
>> Do you even get the password prompt?
>>
>> --
>> Jaime Melis
>> Project Engineer
>> OpenNebula - Flexible Enterprise Cloud Made Simple
>> www.OpenNebula.org | jmelis at opennebula.org
>>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Jaime Melis
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | jmelis at opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140402/1136ee29/attachment-0002.htm>


More information about the Users mailing list