My Oracle Support Banner

OUD 12c - Unable to Create Custom Attribute with Special Character as NAME "Result Code: 21 (Invalid Attribute Syntax)" or "Invalid syntax" (Doc ID 2669990.1)

Last updated on SEPTEMBER 06, 2023

Applies to:

Oracle Unified Directory - Version 12.2.1.3.0 and later
Information in this document applies to any platform.
Oracle is not responsible for instructions/information from 3rd party sites that may be contained in this KM note



Symptoms

Attempting to create a new custom attribute 'custattr[1]' to Oracle Unified Directory 12c  using "ldapmodify" command with below contents:

dn: cn=schema
changetype: modify
add: attributetypes
attributetypes: ( 1.1.1.1 NAME 'custattr[1]' DESC 'Custom attr' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 )

Fails with the following:

Processing MODIFY request for cn=schema
MODIFY operation failed
Result Code: 21 (Invalid Attribute Syntax)
Additional Information: When attempting to modify entry cn=schema to add one or more values for attribute attributetypes, value "( 1.1.1.1 NAME 'custattr[1]' DESC 'Custom attr' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 )" was found to be invalid according to the associated syntax: The provided value "( 1.1.1.1 NAME 'custattr[1]' DESC 'Custom attr' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 )" could not be parsed as a valid attribute type definition because character '[' at position 8 is not allowed in an attribute type name


OR

 ldapadd -h <OUD_HOSTNAME> -p <PORT> -D "<OUD_ADMIN_USER>" -w <PASSWORD> -f <FILENAME>
modifying entry cn=schema
ldap_modify: Invalid syntax
ldap_modify: additional info: When attempting to modify entry cn=schema to add one or more values for attribute attributetypes, value "( 1.1.1.1 NAME 'custattr[1]' DESC 'Custom attr' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 )" was found to be invalid according to the associated syntax: The provided value "( 1.1.1.1 NAME 'custattr[1]' DESC 'Custom attr' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 )" could not be parsed as a valid attribute type definition because character '[' at position 8 is not allowed in an attribute type name

 

Attempting same in OUDSM results in the following error:

error "oracle.ldap.admin.common.SaveChangeException: Name can contain Alphabet (A-Z,a-z), Digit(0-9), Hyphen (-), Underscore (_) only. "

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.