FYI

---------- Forwarded message ----------
From: Ruben S. Montero <[email protected]>
Date: Wed, May 23, 2012 at 11:53 PM
Subject: Re: [one-users] Contextualization
To: "Stantz, Brent - GS" <[email protected]>
Cc: "[email protected]" <[email protected]>


Hi

Currently, we have $UID to get the id of the owner. If you really need the
name then you have to use the whole template. This will give you the whole
user information in XML encoded using base64. A simple python/ruby script
can extract the data you need in the guest. Example

CONEXT = [
USER_UID=$UID,
USER_INF="$USER[TEMPLATE]"
]

This will give you a context.sh script with the following contents

USER_UID="0",
USER_INF="PFVTRVI+PElEPjA8L0lEPjxHSUQ+MDwvR0lEPjxHTkFNRT5vbmVhZG1pbjwvR05BTUU+PE5BTUU+cnViZW48L05BTUU+PFBBU1NXT1JEPmMyNDc4M2JhOTZhMzU0NjQ2MzJhNjI0ZDlmODI5MTM2ZWRjMDE3NWU8L1BBU1NXT1JEPjxBVVRIX0RSSVZFUj5jb3JlPC9BVVRIX0RSSVZFUj48RU5BQkxFRD4xPC9FTkFCTEVEPjxURU1QTEFURT48L1RFTVBMQVRFPjwvVVNFUj4="

USER_INF is the base64 encoding for

"<USER><ID>0</ID><GID>0</GID><GNAME>oneadmin</GNAME><NAME>ruben</NAME>PASSWORD>c24783ba96a35464632a624d9f829136edc0175e</PASSWORD><AUTH_DRIVER>core</AUTH_DRIVER><ENABLED>1</ENABLED><TEMPLATE></TEMPLATE></USER>"

NOTE: You can add any other user information and get that from the guest.
Specially you may be interested in adding a public SSH key to your users
and copy it to the authorized_keys file. The SSH key can be extracted under
USER/TEMPLATE/ as in the previous example

Hope this helps. More info at [1]

Cheers

Ruben

[1] http://www.opennebula.org/documentation:rel3.4:template#context_section

On Wed, May 23, 2012 at 7:28 PM, Stantz, Brent - GS <
[email protected]> wrote:

>  Hi,
>
>   I am trying to configure my VM systems to use the “owners” name as the
> username, I have not been able to ‘retrieve’ the proper username.  Please
> provide the correct variable to give such information.
>
> Thank you,
>
> *Brent Stantz*
> *Software Engineering*
> *Geospatial Systems*
>
> *ITT Exelis*
> *Rochester, NY 14606-0488*
>
>
>  *  ________________________________  *
> Email addresses of ITT Exelis employees will be changing from itt.com to
> exelisinc.com. Please update your favorites and contact information to
> reflect these changes.
>
> This e-mail and any files transmitted with it may be proprietary and are
> intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this e-mail in error please notify the
> sender. Please note that any views or opinions presented in this e-mail are
> solely those of the author and do not necessarily represent those of Exelis
> Inc. The recipient should check this e-mail and any attachments for the
> presence of viruses. Exelis Inc. accepts no liability for any damage caused
> by any virus transmitted by this e-mail.
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Dr. Ruben Santiago Montero
Associate Professor (Profesor Titular), Complutense University of Madrid

URL: http://dsa-research.org/doku.php?id=people:ruben
Weblog: http://blog.dsa-research.org/?author=7



-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | [email protected] | @OpenNebula
_______________________________________________
Users mailing list
[email protected]
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to