Running the ldifgen Utility

When you make changes to your Infor Lawson schema using Schema Editor, the changes are stored in a temporary location and do not affect production data until you run the Infor Lawson ldifgen utility and then import the resulting LDIF. The ldifgen utility creates an ldif file that you import into your LDAP directory (using native LDAP tools). After you run ldifgen and import the ldif file into your LDAP directory, the schema changes you made will take effect.

Do not perform this procedure if you have never imported ldif to your LDAP. This procedure alters your LDAP schema and must be performed by an experienced LDAP administrator.

  1. Open a command prompt in the Infor Lawson Environment and move into the location LAWDIR/system.
  2. Run the command shown in the example. The table describes the parameters.

    Example:

    ldifgen xmltoschemaldif RmMeta_Default.xml -f schema.ldif -r reorg.ldif -m update.ldif -D cn=root,o=lwsnrmmetaroot -w mypassword -h myserver -p 35000

    Parameter Description
    inputxmlfile

    In the example, this is "RmMeta_Default.xml."

    The file used by Schema Editor to write metadata changes. This file was defined when you installed Infor Lawson Security / Resource Management.

    -f schemaoutfile

    In the example, this is "schema."

    schemaoutfile is the name of the output file where the schema modification ldif will be written. You assign this name. Use the format filename.ldif.

    Schema in this case means the structure of the LDAP objects.

    -r reorgfile

    In the example, this is "reorg.ldif."

    reorgoutfile is the name of the output file where the data modification ldif will be written, if necessary.

    In some situations, a reorg file will not be included in the ldifgen output. For example, if you are changing the default value of an attribute or adding a new attribute that had not yet been populated, a data transformation does not occur and, therefore, no reorg file is generated, or, in some cases, a file is generated but has no records. It is a good practice to always include the —r parameter when you run ldifgen.

    -m metadataoutfile

    In the example, this is "update.ldif."

    metadataoutfile is the name of the output file where the updated ldif metadata file will be written. Metadata in this case refers to the structure of the Infor Lawson objects in the LDAP.

    -D binddn

    In the example this is, cn=root,o=lwsnrmmetaroot

    binddn is the LDAP distinguished name used to bind to the LDAP server.

    -w password password is the password that you use to run the LDAP server.
    -h host host is the hostname of the LDAP server.
    -p port port is the port number that the LDAP server is listening on.
    -v verbose Optional. Use this parameter to run the command with detailed output turned on.

    When the process completes, you should receive the message "Command completed successfully."

  3. Check the resulting output files (reorgoutfile.ldif, schemaoutfile.ldif, and metadataoutfile.ldif) to make sure they have data and look the way you expect. Depending on the changes you made through Schema Editor, an empty output file could be a normal situation. It is not necessary to import an empty file, however, doing so will not cause any problems.
  4. Following instructions from your LDAP vendor, load the output files in the following order:
    • reorgoutfile.ldif (if necessary)

    • schemaoutfile.ldif

    • metadataoutfile.ldif

    For example, if you use ADAM, you would run the command ldifde; if you use IBM Directory Server, you would run the command ldapmodify.

  5. Stop your application server.
  6. Run the Infor stoplaw command.
    When you are ready to restart the Infor Lawson system, run the startlaw command and then start your application server.