Ldap Error 65 Object Class Violation
Contents |
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor. Announcement http://forum.spring.io/forum/spring-projects/data/ldap/46767-schemaviolationexception-when-attempting-to-bind-new-user Announcement Module Collapse No announcement yet. SchemaViolationException when attempting to bind new user Page Title Module Move Remove Collapse X Conversation Detail Module Collapse Posts Latest Activity http://serverfault.com/questions/453786/ldap-object-class-violation-attribute-ou-not-allowed-in-suffix Search Forums Page of 1 Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only ldap error Filtered by: Clear All new posts [emailprotected] Junior Member Join Date: May 2008 Posts: 5 #1 SchemaViolationException when attempting to bind new user May 29th, 2008, 03:59 PM Hi, I'm having some difficulty adding a new user to my LDAP server that has me a little confused (I am, admittedly, pretty inexperienced with Spring-LDAP). ldap error code I'd be pretty grateful to anyone that could suggest where my code might be falling out of bed. Code: ... public void create(LdapPerson person) { DirContextAdapter context = new DirContextAdapter(); mapToContext(person, context); ldapTemplate.bind(buildDn(person), context, null); } protected Name buildDn(LdapPerson person) { return buildDn(person.getUserId(), person.getCompanyName()); } protected Name buildDn(String userId, String ou) { DistinguishedName dn = new DistinguishedName(); dn.add("ou", ou); dn.add("uid", userId); return dn; } protected void mapToContext(LdapPerson person, DirContextOperations context) { context.setAttributeValues("objectclass", new String[] { "top", "person" }); context.setAttributeValue("cn", person.getFullName()); context.setAttributeValue("givenName", person.getFirstName()); context.setAttributeValue("sn", person.getLastName()); context.setAttributeValue("uid", person.getUserId()); context.setAttributeValue("description", person .getFoiPayrollCustomerCode()); context.setAttributeValue("employeeNumber", person.getEmployeeNumber()); context.setAttributeValue("userPassword", person.getUserPassword()); //this is a byte[] } ... I'm getting a SchemaViolationException: [LDAP: error code 65 - Object Class Violation]; remaining name 'uid=user id, ou=org name' when I attempt to test my create(LdapPerson) method. I am able to retrieve information from the LDAP server without incident. Am I failing to assign the new user to its ou properly? Something else, maybe? Thanks, in advance, for your time and he
Start 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 Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top LDAP object class violation: attribute ou not allowed in suffix? up vote 2 down vote favorite I am about to set up a LDAP directory. It is used as a tool to communicate user permissions from a web application to WebDav file system access, e.g. adding a user to the web platform shall allow login to the file system with the same credentials. There are no other usages intended. Following this German tutorial which encourages the use of the attributes c, o, ou etc. over dc, I configured the following suffix and root: suffix "ou=webtool,o=myOrg,c=de" rootdn "cn=ldapadmin,ou=webtool,o=myOrg,c=de" Server starts and I can connect to it by LDAP Admin, which reports “LDAP error: Object lacks”. Well, there aren’t any objects yet. I now want to create the root and admin elements from shell. I created an init.ldif file: dn: ou=webtool,o=myOrg,c=de objectclass: dcObject objectclass: organization dc: webtool o: webtool dn: cn=ldapadmin,ou=webtool,o=myOrg,c=de objectclass: organizationalRole cn: ldapadmin Trying to load the file runs into an error, telling me that ou is not allowed: server:~ # ldapadd -x -D "cn=ldapadmin,ou=webtool,o=myOrg,c=de" -W -f init.ldif Enter LDAP Password: adding new entry "ou=webtool,o=myOrg,c=de" ldap_add: Object class violation (65) additional info: attribute 'ou' not allowed I am not using ou anywhere except in the suffix, so the question: Isn’t it allowed here? What is allowed here? ldap openldap share|improve this question edited Dec 4 '12 at 7:29 asked Nov 30 '12 at 10:05 Paramaeleon 193211 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted There are numberous dependencies for the creation of elements, and error messages are rather confusing if you don’t know of the concept. The objectclass isn’t necessarily dcObject for the databases’ root node, as it is likely to guess when you read several tutoriales. Instead, it must corresp