In this case, specifying the RDN of uid=user.5 undeletes the original entry, but with the new distinguished name (DN) in the following example, and the uid attribute on the entry is updated with the new value of user.5. All other attributes of the users entry, including the entryUUID, remain unchanged.

To undelete a soft-deleted-entry using a new RDN:

  1. Run the command ldapmodify to undelete a soft-deleted entry that has an original RDN, uid=user.1, to a new RDN, uid=user.5.
    Note:

    If you specify a DN that already exists in the PingDirectory server as a normal entry, this leads to an entry already exists error. Ensure the DN that you are undeleting the entry to does not already exist.

    $ bin/ldapmodify --allowUndelete
    dn: uid=user.5,ou=People,dc=example,dc=com
    changetype:add
    ds-undelete-from-dn: entryUUID=4e9b7847-edcb-3791-b11b-7505f4a55af4+uid=user.1,ou=People,dc=example,dc=com
    
  2. To view the results, run ldapsearch.
    dn: uid=user.5,ou=People,dc=example,dc=com
    objectClass: top
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    postalAddress: Aartjan Aalders$59748 Willow Street$Green Bay, TN 66239
    postalCode: 66239
    description: This is the description for Aartjan Aalders.
    uid: user.5
    userPassword: {SSHA}RdBCwQ2kIw57LukRthjrFBS/oFylJARnmTnorA==
    employeeNumber: 1
    initials: AKA
    givenName: Aartjan
    pager: +1 197 025 3730
    mobile: +1 890 430 9077
    cn: Aartjan Aalders
    sn: Aalders
    telephoneNumber: +1 094 100 7524
    street: 59748 Willow Street
    homePhone: +1 332 432 4295
    l: Green Bay
    mail: user.3@maildomain.net
    st: TN
    entryUUID=4e9b7847-edcb-3791-b11b-7505f4a55af4
    The RDN and the uid attribute has changed.