Output of Ldapsearch Seems Corrupt After Creating using Ldapadd in OID (Doc ID 1619111.1)

Last updated on JUNE 08, 2017

Applies to:

Oracle Internet Directory - Version 10.1.4 and later
Information in this document applies to any platform.

Symptoms

1.  Created a ldif file to create a new user using ldapadd

File contained the following:

dn: cn=user1.name,cn=Users,dc=oracle,dc=com
cn: user1.name
givenname: user1
sn: name
uid: user1.name
mail: user1.name@oracle.com
userpassword: tester1
description: temp account
objectclass: inetOrgPerson
objectclass: top
objectclass: account
objectclass: organizationalPerson
objectclass: person

2. Add the user using ldapadd

example: ldapadd -h myhost -p 3060 -D cn=orcladmin -w pwd -f newuser.ldif

and user gets added successfully.

 

3. When searching user, the following is returned:

$ORACLE_HOME/bin/ldapsearch -h myhost -p 3060 -D "cn=orcladmin" -w password  -b "cn=user1.name,cn=Users,dc=oracle,dc=com" -s sub -L "objectclass=*"


dn:: Y249b3NzY2luZHkuaHUsb3U9dXNlcnMuZXh0ZXJuYWwsY249VXNlcnMsZGM9bWF4aW11c2Jj
aGVhbHRoLGRjPWxvY2FsDQ==
cn:: b3NzY2luZHkuaHUN
givenname:: Q2luZHkN
sn:: SHUN
uid:: b3NzY2luZHkuaHVAbWF4aW11c2JjaGVhbHRoLmxvY2FsDQ==
mail:: b3NzY2luZHkuaHVAbWF4aW11c2JjLmNhDQ==

OR


$ORACLE_HOME/bin/ldapsearch -h myhost -p 3060 -D "cn=orcladmin" -w password-b "cn=user1.name,cn=Users,dc=oracle,dc=com" -s sub -L "cn=user1.name"

dn:: Y249b3NzY2luZHkuaHUsb3U9dXNlcnMuZXh0ZXJuYWwsY249VXNlcnMsZGM9bWF4aW11c2Jj
aGVhbHRoLGRjPWxvY2FsDQ==
cn:: b3NzY2luZHkuaHUN
givenname:: Q2luZHkN
sn:: SHUN
uid:: b3NzY2luZHkuaHVAbWF4aW11c2JjaGVhbHRoLmxvY2FsDQ==
mail:: b3NzY2luZHkuaHVAbWF4aW11c2JjLmNhDQ==
description:: dGVtcCBhY2NvdW50DQ==

 

However, removing the -L returns the expected values.

LDIFWRITE returns what looks to be a corrupt user entry or entry DN.   It is actually added and displayed as base64 encoded (or, as sometimes referred, binary encoded).

Changes

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms