H.3 Novell eDirectory Attribute Macros

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:

H.3.1 Syntax

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.

H.3.2 Examples

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%

H.3.3 Configuring the eDirectory Attribute Macros

To use eDirectory attributes as a reference in the bundle macros, you must do the following:

On the eDirectory Server:

Define a name mapping between LDAP attribute types and eDirectory attribute definitions. You can log in to Novell iManager and click Attribute Map to do the mapping. For example, you can choose to map an eDirectory attribute named GWMailID, which stores the user e-mail id, to a Primary LDAP Attribute named Mail.

Only 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.

On the ZENworks Server:

  1. 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

  2. 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.

  3. Save the sample file as edirectory-users-additional.zls.xml.

  4. Replace the edirectory-users-additional.zls.xml file on all the Primary Servers in the Management Zone.

  5. Restart the zenserver service.

  6. 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.

  7. 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.