Application Launcher supports macros that pull information from the attributes of the currently logged-in user or from the attributes of other eDirectory objects.
The following sections explain the macro syntax and provide examples:
eDirectory attribute macros use the following syntax:
${eDirectory_attribute}
Table H-3 Macro Syntax
Element |
Description |
---|---|
$ |
Flags the text as a macro. The entire macro must be enclosed in $ characters. |
eDirectory_attribute |
Defines the attribute to be read. You can use the ConsoleOne Schema Manager (available from the Tools menu) to view an eDirectory object’s available attributes. |
The following table provides examples of eDirectory attribute macros.
Table H-4 Macro Examples
Macro |
Description |
---|---|
${CN} |
Returns the common name of the currently logged-in user. |
${DN} |
Returns the distinguished name of the currently logged-in user. |
${FullName} |
Returns the full name of the currently logged-in user. This is the name defined in User object > General tab > Identification page > Full Name field. |
${Given Name} |
Returns the first name of the currently logged-in user. This is the name defined in User object > General tab > Identification page > Given Name field. |
${Surname} |
Returns the last name of the currently logged-in user. This is the name defined in the User object > General tab > Identification page > Last Name field. |
NOTE:For compatibility with traditional ZENworks, the macros can also be specified in one of the following formats:
%macro%
For example, %CN%
%*macro%
For example, %*CN%
To use eDirectory attributes as a reference in the bundle macros, you must do the following:
Define a name mapping between LDAP attribute types and eDirectory attribute definitions. You can log in to Novell iManager and click GWMailID, which stores the user e-mail id, to a Primary LDAP Attribute named Mail.
to do the mapping. For example, you can choose to map an eDirectory attribute namedOnly User attributes are supported.
For information on mapping the LDAP attribute types and eDirectory attribute, see Novell eDirectory Administration guide at the Novell Documentation Website.
Edit the following sample file to create a file that contains the attribute that you want to use with ZENworks:
On Windows: ZENworks_Home/novell/zenworks/datamodel/authsource/edirectory-users-additional.zls.xml.sample
On Linux: /etc/opt/novell/zenworks/datamodel/authsource/edirectory-users-additional.zls.xml.sample
Add an entry for the attribute that you want to use with ZENworks. For example:
<attribute name="ZEN" ldapName="Mail" builder="com.novell.zenworks.datamodel.session.jndi.builder.StringAttributeBuilder" />
where ZEN is the attribute that you want to use with ZENworks and Mail is the Primary LDAP Attribute that you mapped with the eDirectory attribute named GWMailID.
NOTE:You have to use the right builder depending on whether the syntax is a string, integer, or boolean. The edirectory-users-additional.zls.xml.sample file lists the different type of builders.
Save the sample file as edirectory-users-additional.zls.xml.
Replace the edirectory-users-additional.zls.xml file on all the Primary Servers in the Management Zone.
Restart the zenserver service.
Create a bundle with an action that references the macro and is running in the user impersonation mode. For example, create a bundle with a Run Script action that references the macro ${ZEN} and the executable security level is set to Run as logged in user.
Perform the bundle assignment.
When the action gets executed on the managed device, the value of the LDAP attribute is substituted for the macro. In the stated example, the email id stored in the GWMailID attribute is substituted for the macro ${ZEN}. Consequently, when the action gets executed on the managed device, the e-mail id stored in the GWMailID attribute is displayed on the device.