[one-users] Context variables - getting username

Ruben S. Montero rsmontero at opennebula.org
Tue Aug 28 08:10:43 PDT 2012


Hi

Just sent an email with a patch for this. We are having some problems with
our archiving service for the mailing list, so let me quickly summarize the
options:

1.- Add a NAME variable in the user template as described by Hyunwoo, this
will give you $USER[NAME]
2.- Apply the patch in [1]. This will give you access to $UNAME, $UID,
$GNAME, $GID

Cheers

Ruben

[1] http://dev.opennebula.org/issues/1428

On Tue, Aug 28, 2012 at 5:04 PM, Hyun Woo Kim <hyunwoo at fnal.gov> wrote:

> Hi,
>
> Yesterday I learned from ON developer Ruben that
> for instance oneadmin can do
> oneuser update ID(of the user who actually instantiates the VM template)
> which will open an editor where oneadmin can type in
> NAME="the username you want".
> This will enable $USER[NAME] to return "the username you want" in the
> CONTEXT.
>
> Hope this helps.
> Hyunwoo
>
>
> On Aug 27, 2012, at 6:42 PM, Jon Burger wrote:
>
> > Hello,
> >
> > I would like to know if there is a context variable that contains the
> username of the person creating the VM.  We have OpenNebula authenticating
> against active directory and wish to pass the username into the VM to
> create the user id locally (in the case of Linux use kerberose).
> >
> > I understand I can get UserID eg $UID, and that by using $USER[TEMPLATE]
> can receive a 64bit encoded XML string that contains the username, but I'd
> rather not parse XML if I can help it as that feels a little dirty to me.
> >
> > We have tried the obvious $USER[NAME] - which always returns null.
> >
> > It may just be a bug, but before submitting I thought I would ask.
> >
> > Thanks,
> >
> > Jon
> > _______________________________________________
> > Users mailing list
> > Users at lists.opennebula.org
> > http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
Ruben S. Montero, PhD
Project co-Lead and Chief Architect
OpenNebula - The Open Source Solution for Data Center Virtualization
www.OpenNebula.org | rsmontero at opennebula.org | @OpenNebula
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20120828/bd25d82f/attachment-0002.htm>


More information about the Users mailing list