My Oracle Support Banner

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

Last updated on OCTOBER 14, 2019

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=<USERNAME>,cn=Users,dc=<COMPANY>,dc=com
cn: <USERNAME>
givenname: <USERNAME>
sn: <SUR_NAME>
uid: <UID>
mail: <USERNAME>.<DOMAIN>
userpassword: <PASSWORD>
description: temp account
objectclass: inetOrgPerson
objectclass: top
objectclass: account
objectclass: organizationalPerson
objectclass: person

2. Add the user using ldapadd

example: ldapadd -h <OID_HOSTNAME> -p <OID_PORT> -D cn=orcladmin -w <PASSWORD> -f <FILENAME>

and user gets added successfully.

 

3. When searching user, the following is returned:

$ORACLE_HOME/bin/ldapsearch -h <OID_HOSTNAME> -p <OID_PORT> -D cn=orcladmin -w <PASSWORD>  -b "cn=<USERNAME>,cn=Users,dc=<COMPANY>,dc=com" -s sub -L "objectclass=*"


dn:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
cn:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
givenname:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
sn:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
uid:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
mail:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>

OR


$ORACLE_HOME/bin/ldapsearch -h <OID_HOSTNAME> -p <OID_PORT> -D cn=orcladmin -w <PASSWORD> -b "cn=Users,dc=<COMPANY>,dc=com" -s sub -L "cn=<USERNAME>

dn:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
cn:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
givenname:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
sn:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
uid:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
mail:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>
description:: <RANDOM_STRING_OF_LETTERS_&_NUMBERS>

 

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).

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.