Ldap Error Code 17 Attributedescription Contains Inappropriate Characters
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up InvalidAttributeIdentifierException: [LDAP: error code 17 - Object Class: AttributeDescription contains inappropriate characters] up vote 0 down vote favorite I am getting the follwing error javax.naming.directory.InvalidAttributeIdentifierException: [LDAP: error code 17 - Object Class: AttributeDescription contains inappropriate characters]; This is my Class: public class OpenLDAPTest { public static void main(String[] args) { String url = "ldap://localhost:389"; Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, url); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, "cn=Manager,dc=maxcrc,dc=com"); env.put(Context.SECURITY_CREDENTIALS, "secret"); try { DirContext ctx = new InitialDirContext(env); System.out.println("connected"); System.out.println(ctx.getEnvironment()); System.out.println("Creating subContext"); String name = "dc=mine, dc=com"; Attributes atrs = new BasicAttributes(); Attribute atr1 = new BasicAttribute("Object Class"); atr1.add("OrgPerson"); atrs.put(atr1); Attribute atr2 = new BasicAttribute("cn"); atr2.add("sathish"); atrs.put(atr2); atrs.put("Phone", "12345"); Context c = ctx.createSubcontext(name, atrs); System.out.println(c.getEnvironment()); ctx.close(); } catch (AuthenticationNotSupportedException ex) { System.out.println("The authentication is not supported by the server"); } catch (AuthenticationException ex) { System.out.println("incorrect password or username"); } catch (NamingException ex) { //System.out.println("error wh
characters] From: Steven Engelhard Date: Wed, 30 May 2001 15:57:51 +0200 Cc: OpenLDAP-software@OpenLDAP.org References: <3B14C328.418FC849@steven-engelhard.de> <01053015444000.02523@office.interoffice> <3B14CCDA.4009D718@steven-engelhard.de> <01053017200801.02908@office.interoffice> I've renaimed my Attributes into "userDescription" etc. Do I have to put them into the schema although I´ve "schemacheck off" in my slapd.conf? Steven. Devdas Bhagat wrote: > On Wed, 30 http://stackoverflow.com/questions/37153733/invalidattributeidentifierexception-ldap-error-code-17-object-class-attrib May 2001, Steven Engelhard spewed into the ether: > > Ok this works fine, but now i get the following error: > > > > [LDAP: error code 17 - attribute type undefined] > > javax.naming.directory.InvalidAttributeIdentifierException: [LDAP: error > > http://www.openldap.org/lists/openldap-software/200105/msg00700.html code 17 > > - attribute type undefined]; remaining name > For which attribute? Is it defined in the schema? > Try renaming your attributes to: userDescription, userRights...... and > put those in the schema. Then try adding/modifying them > > Devdas Bhagat References: [LDAP: error code 17 - attribute description contains inappropriate characters] From: Steven Engelhard Re: [LDAP: error code 17 - attribute description contains inappropriate characters] From: Devdas Bhagat Re: [LDAP: error code 17 - attribute description contains inappropriate characters] From: Steven Engelhard Re: [LDAP: error code 17 - attribute description contains inappropriate characters] From: Devdas Bhagat Prev by Date: Re: referrals Next by Date: RE: slapcat error 79? Index(es): Chronological Thread
Wed, 15 Sep 2004 12:21:39 -0500 We are running OpenLDAP 2.2.15 (installed from source) on RHES3 and are getting "AttributeDescription contains inappropriate characters" whenever one of our applications tries to do a certain query. The general flow is this: 1. Query if user account exists. 2. http://www.openldap.org/lists/openldap-software/200409/msg00337.html Do a bind(). 3. Check group membership. Here is the '-d -1' output http://marc.info/?t=99121752700001&r=1&w=2 when the error occurs: ... ldap_err2string <= ldap_dn2bv(cn=xx,ou=groups,dc=example,dc=com)=0 Success <<< dnPrettyNormal: , send_ldap_result: conn=1 op=1 p=3 send_ldap_result: err=17 matched="" text="AttributeDescription contains inappropriate characters" send_ldap_response: msgid=2 tag=111 err=17 ber_flush: 68 bytes to sd 14 0000: 30 42 02 01 02 6f 3d 0a 01 11 04 00 04 36 41 74 0B...o=......6At 0010: ldap error 74 72 69 62 75 74 65 44 65 73 63 72 69 70 74 69 tributeDescripti 0020: 6f 6e 20 63 6f 6e 74 61 69 6e 73 20 69 6e 61 70 on contains inap 0030: 70 72 6f 70 72 69 61 74 65 20 63 68 61 72 61 63 propriate charac 0040: 74 65 72 73 ters ldap_write: want=68, written=68 0000: ldap error code 30 42 02 01 02 6f 3d 0a 01 11 04 00 04 36 41 74 0B...o=......6At 0010: 74 72 69 62 75 74 65 44 65 73 63 72 69 70 74 69 tributeDescripti 0020: 6f 6e 20 63 6f 6e 74 61 69 6e 73 20 69 6e 61 70 on contains inap 0030: 70 72 6f 70 72 69 61 74 65 20 63 68 61 72 61 63 propriate charac 0040: 74 65 72 73 ters conn=1 op=1 RESULT tag=111 err=17 text=AttributeDescription contains inappropriate characters ... I found that this error is generated by servers/slapd/ad.c in two places: openldap-2.2.15/servers/slapd/ad.c:slap_bv2ad() /* make sure description is IA5 */ if( ad_keystring( bv ) ) { *text = "AttributeDescription contains inappropriate characters"; return rtn; } openldap-2.2.15/servers/slapd/ad.c:slap_bv2undef_ad() /* make sure description is IA5 */ if( ad_keystring( bv ) ) { *text = "AttributeDescription contains inappropriate characters"; return LDAP_UNDEFINED_TYPE; } The variable bv (struct berval) is passed to both functions. What I can't tell from the debug output is what is CAUSING bv to not be valid. Is the LDAP client sending a query with a bad string? I don't see that in the debug output. Could there be
2001-05-30 Re: [LDAP: error code 17 - attribute description cont openldap- Devdas Bhagat 2. 2001-05-30 Re: [LDAP: error code 17 - attribute description cont openldap- Devdas Bhagat 3. 2001-05-30 Re: [LDAP: error code 17 - attribute description cont openldap- Devdas Bhagat Configure | About | News | Addalist | SponsoredbyKoreLogic