The following example fetches the user with sampleID=scase under the ou=east,o=sample base DN.

  1. Run ldapsearch to view a Sample entry.
    root@proxy-east-01: bin/ldapsearch --bindDN "cn=directory manager" \
    --bindPassword password --baseDN "ou=east,o=sample" "(sampleID=scase)"
    dn: sampleID=scase,ou=People,ou=east,o=sample
    objectClass: person
    objectClass: organizationalPerson
    objectClass: inetOrgPerson
    objectClass: exampleAccount
    objectClass: top
    description: A customer account migrated from Sample merger
    sampleID: scase
    userPassword: {SSHA}A5O4RrQHWXc2Ii3btD4exGdP0TVW9VL3CR3ZXA==
    exAccountNumber: 234098
    givenName: Sterling
    cn: Sterling Case
    sn: Case
    telephoneNumber: +1 804 094 3356
    street: 00468 Second Street
    mail: sterlingcase@maildomain.com
    l: Arlington
    st: VA
    sampleRegion: east
    sampleLinkedAccounts: sampleID=jcase,ou=People,ou=east,o=sample
  2. Modify the sampleRegion value, changing it to west. To do this, we first create a ldapmodify input file, called scase-mod.ldif, with the following contents:
    dn: sampleID=scase,ou=People,ou=east,o=sample 
    changetype: modify   
    replace: sampleRegion
    sampleRegion: west
  3. Use the file as an argument in the ldapmodify command as follows.
    root@proxy-east-01: bin/ldapmodify --bindDN "cn=Directory Manager" \
    --bindPassword password --filename scase-mod.ldif
    
    Processing MODIFY request for sampleID=scase,ou=People, ou=east,o=sample    
    MODIFY operation successful for DN sampleID=scase,ou=People, ou=east,o=sample    
    
  4. Search for scase's sampleRegion value under o=sample, we should see west:
    root@proxy-east-01: bin/ldapsearch --bindDN "cn=directory manager" \
    --bindPassword password --baseDN "o=sample"  "(sampleID=scase)" \
    sampleRegion
    dn: sampleID=scase,ou=People,ou=east,o=sample
    sampleRegion: west
  5. Search for scase by uid rather than sampleID, under the dc=example,dc=com base DN. We see the Example.com schema version of the entry:
    root@proxy-east-01: bin/ldapsearch --bindDN "cn=directory manager" \
    --bindPassword password --baseDN "dc=example,dc=com"  "(uid=scase)"
    dn: uid=scase,ou=People,dc=example,dc=com
    objectClass: person
    objectClass: exampleAccount
    objectClass: inetOrgPerson
    objectClass: organizationalPerson
    objectClass: top
    description: A customer account migrated from Sample merger
    uid: scase
    userPassword: {SSHA}A5O4RrQHWXc2Ii3btD4exGdP0TVW9VL3CR3ZXA==
    exAccountNumber: 234098
    givenName: Sterling
    cn: Sterling Case
    sn: Case
    telephoneNumber: +1 804 094 3356
    street: 00468 Second Street
    mail: sterlingcase@maildomain.com
    l: Arlington
    st: VA
    exSampleRegion: west
    exSampleLinkedAccounts: uid=jcase,ou=People,dc=example,dc=com