PingDirectory

Running the parallel-update tool

Steps

  1. Create an LDIF file with your changes.

    Example:

    The third change in this example generates a rejected entry because its userPassword attribute contains an encoded value, which is not allowed.

    dn:uid=user.2,ou=People,dc=example,dc=com
    changetype: delete
    
    dn:uid=user.99,ou=People,dc=example,dc=com
    changetype: moddn
    newrdn: uid=user.100
    deleteoldrdn: 1
    
    dn:uid=user.101,ou=People,dc=example,dc=com
    changetype: add
    objectClass: person
    objectClass: inetOrgPerson
    objectClass: organizationalPerson
    objectClass: top
    postalAddress: Ziggy Zad$15172 Monroe Street$Salt Lake City, MI 49843
    postalCode: 49843
    description: This is the description for Ziggy Zad.
    uid: user.101
    userPassword: {SSHA}IK57iPozIQybmIJMMdRQOpIRudIDn2RcF6bDMg==
    
    dn:uid=user.100,ou=People,dc=example,dc=com
    changetype: modify
    replace: st
    st: TX
    -
    replace: employeeNumber
    employeeNumber: 100
  2. To apply the changes in the LDIF file to a target server, run parallel-update with the --ldifFile and --rejectFile options.

    The --ldifFile and --rejectFile options are required.

    Example:

    In this example, there are ten concurrent threads. The optimal number of threads depends on your underlying system.

    $ bin/parallel-update --hostname 127.0.0.1 \
      --ldifFile changes.ldif --rejectFile reject.ldif --numThreads 10

    Result:

    Reached the end of the LDIF file
    Attempts Successes Rejects ToRetry AvgOps/S RctOps/S AvgDurMS RctDurMS
    -------- --------- ------- ------- -------- -------- -------- ---------
           4         3       1       0        3        3       26       26
    All processing complete Attempted 4 operations in 1 seconds
  3. View the rejects files for any failed updates.

    Result:

    The following sample elaborates on the rejected file.

    # ResultCode=53, Diagnostic Message=Pre-encoded passwords are not allowed for
    # the password attribute userPassword
    dn: uid=user.101,ou=People,dc=example,dc=com
    changetype: add
    objectClass: person
    objectClass: inetOrgPerson
    objectClass: organizationalPerson
    objectClass: top
    postalAddress: Ziggy Zad$15172 Monroe Street$Salt Lake City, MI 49843
    postalCode: 49843
    description: This is the description for Ziggy Zad.
    uid: user.101
    userPassword: {SSHA}IK57iPozIQybmIJMMdRQOpIRudIDn2RcF6bDMg==