Adding resources in batch mode

You can use LDIF files to add users or other resources to the local data store in bulk.

To add resources in batch mode, you must have access to the mkwg or chwg commands, and you must be familiar with editing LDIF files.

The use of LDIF files to add multiple resources is primarily intended for environments that store user information in a local SafeLinx user account database, rather than an external directory server. However, even in deployments that use an external directory, SafeLinx stores certain attributes in the local user database. For example, in deployments that support multiple IBM Traveler High Availability server pools an attribute in the local account database stores information about users' Traveler pool assignments. By setting the attribute in an LDIF file and importing the file into the account database,you can designate a user's Traveler pool assignment before their first login.

A set of sample LDIF files are included in the SafeLinx Administrator installation directory. Table 1 lists the names of the sample files and indicates the contents of each file.
Sample Name Description
samples/ldif/userall.ldif Example of adding users with all fields specified
samples/ldif/userreq.ldif Example of adding users with required fields specified
samples/ldif/mdevall.ldif Example of adding mobile devices with all fields specified
samples/ldif/mdevreq Example of adding mobile devices with required fields specified

To minimize the amount of space that user records take in the user account database, start with one of the LDIF templates that includes the required fields only. You can then add any non-required fields that you want to include. The *all.ldif files are provided for completeness and show all the fields that you can include in a user record.

To add information about a user's Traveler pool assignment, at a minimum, each LDIF record must include the following attributes:

dn: uid=USERID,cn=Users,cn=System,o=SUFFIX 
objectclass: ibm-wlUser
uid: USERID 
ibm-wlServerPool: SPDN

In the preceding LDIF record, USERID represents the name of the user account for logging in to SafeLinx and Traveler, typically an email address. SUFFIX represents the base DN that is configured for this SafeLinx Server. SPDN represents the DN of the Traveler application server pool to which this user is assigned. The following example shows a sample LDIF record with values assigned to each of the required attributes:


dn: uid=PP07234,cn=Users,cn=System,o=hcl
objectclass: hcl-wlUse
uid: PP07234
hcl-wlServerPool: cn=TRPool1,ou=Default Resources,o=hcl
  1. Make a copy of the LDIF sample file that includes the resource type and format that you want to use.
  2. Use a text editor to open the LDIF sample file and then edit it to reflect your organization's settings and to specify the resources that you want to add.
    Each resource entry in the file starts with the distinguished name (dn).
    Note: After you edit the files, review them carefully before you process them. Resources that you add through the batch process are not checked for errors in the same way that resources added from the SafeLinx Administrator are.
  3. To load the LDIF file into the SafeLinx user account database, transfer the file to the SafeLinx Server, and then run the following command: mkwg -f ldif_file