Ldaperr Error In Attribute Conversion Operation
Contents |
(עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語) HomeWindows 10Windows 10 MobilePrevious versionsMDOPSurfaceSurface HubLibraryForums Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Error when trying to add a user entry to ldap: error code 16 - 00000057 Active Directory via LDAP interface Windows Server > Directory Services Question 0
Dsid-0c090b8a
Sign in to vote I'm attempting to add a user entry to an Active Directory server here via the ldap: error code 21 - 00000057 LDAP interface from a Linux host using OpenLDAP tools (ldapadd or ldapmodify). Here's a bare-bones example of what I'm trying to add to Active Directory: DN: CN=John Smith,CN=Users,DC=ad,DC=cs,DC=wisc,DC=edu objectClass: user CN: John Smith sn: John givenName: Smith displayName: John Smith sAMAccountName: jsmith userPrincipalName: jsmith@ad.cs.wisc.edu altSecurityIdentities: Kerberos:jsmith@CS.WISC.EDU The Active Directory domain is "ad.cs.wisc.edu" in this case. I am binding to Active Directory via LDAP+SSL (port 636) as user Administrator. I can successfully bind to Active Directory and search for entries, but adding errors produces the following error: ldapadd -x -H ldaps://bunyan.ad.cs.wisc.edu -D "CN=Administrator,CN=Users,DC=ad,DC=cs,DC=wisc,DC=edu" -w ADMINISTRATOR_PW -f /tmp/jsmith.ldif -v ldap_initialize( ldaps://bunyan.ad.cs.wisc.edu ) add objectClass: user add CN: John Smith add sn: John add givenName: Smith add displayName: John Smith add sAMAccountName: jsmith add userPrincipalName: jsmith@ad.cs.wisc.edu adding new entry "CN=John Smith,CN=Users,DC=ad,DC=cs,DC=wisc,DC=edu" modify complete ldapadd: No such attribute (16) additional info: 00000057: LdapErr: DSID-0C090C3E, comment: Error in attribute conversion operation, data 0, v1db1 The "additional info" is logged on event log on the Active Directory server as well as being returned when trying to run ldapadd. Any suggestions from Active Directory gurus out there? Am I missing some required fields as demanded by AD schema, or is this a permission issue? John Thursday, April 28, 2011 7:04 PM Reply | Quote Answers 2 Sign in to vote Looks like my LDIF file had some trailing spaces at the end of some lines. ldapadd/ldapmodify (or the LDAP service on our Active Directory server) apparently doesn't like that. Once those trailing space were removed, the LDIF loads just fine. Thank you to those who looked into this and offered suggestions. John Marked as answer by Arthur_LiMic
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, https://social.technet.microsoft.com/Forums/windows/en-US/a56b24c8-5929-46f6-8efe-757b450edc9c/error-when-trying-to-add-a-user-entry-to-active-directory-via-ldap-interface?forum=winserverDS helping each other. Join them; it only takes a minute: Sign up LDAP java error: adding entry.javax.naming.directory.NoSuchAttributeException up vote 1 down vote favorite 1 I have a problem adding an entry in LDAP, precisely I want to add a user. class AddUser { public static void main(String[] args) { String userName = "manager"; String password = "pass"; Hashtable http://stackoverflow.com/questions/24311076/ldap-java-error-adding-entry-javax-naming-directory-nosuchattributeexception env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://192.168.10.45:389/dc=mydc,dc=local"); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, new String("mydc" + "\\" + userName)); env.put(Context.SECURITY_CREDENTIALS, password); // env.put(Context.REFERRAL, "follow"); // entry's DN String entryDN = "cn=NewUser, dc=mydc, dc=local"; // entry's attributes Attribute cn = new BasicAttribute("cn", "NewUser"); Attribute sn = new BasicAttribute("sn", "Smith"); Attribute mail = new BasicAttribute("mail", "newuser@foo.com"); Attribute phone = new BasicAttribute("telephoneNumber", "+1 222 3334444"); Attribute uid = new BasicAttribute("uid", "nsmith"); Attribute userPassword = new BasicAttribute("userPassword", "pwd1"); Attribute oc = new BasicAttribute("objectClass"); oc.add("dcObject"); oc.add("person"); oc.add("inetOrgPerson"); DirContext ctx = null; try { // get a handle to an Initial DirContext ctx = new InitialDirContext(env); // build the entry Attributes entry = new BasicAttributes(); entry.put(cn); entry.put(sn); entry.put(mail); entry.put(phone); entry.put(uid); entry.put(userPassword); entry.put(oc); // Add the entry ctx.createSubcontext(entryDN, entry); System.out.println("AddUser: added entry " + entryDN + "."); } catch (NamingException e) { System.err.println("AddUser: error adding entry." + e); } } } I got the following error: AddUser: error adding entry.javax.naming.directory.NoSuchAttributeException: [LDAP: error code 16 - 00000057: LdapErr: DSID-0C090C3E, comment: Error in attribute conversion operation, data 0, v1db1 ]; remaining
reading MuadDib_II07-Jan-2015, 08:57Hi again, I don't know what do you think, but https://forums.netiq.com/archive/index.php/t-52531.html the task of read logs is very complicated with NIM. I'm doing a migration from IDV to AD, and the users are supposed to https://web.liferay.com/community/forums/-/message_boards/message/33079334 migrate after a flag changing, witch is manually made. I change NIM's attribute businessCategory to "tomigrate". This works well for most of my ldap: error users, but in some cases I'm having the message Invalid syntax error. The transaction is in this log: http://pastebin.com/ZeyP4pcy. Yesterday I passed almost all day trying to analyze it, but I have to say that I can't even find witch of my rules throws the error message... :( ldap: error code The message "Invalid syntax" appears several times. I try to search near the first appearance, but I can't see no rule near it... If I could find the rule, I probably will be able to identify the attribute that bugs... Thanks again, Marc joakim_ganse07-Jan-2015, 09:58The error you get is this:
English » 3. Development Recent Posts Statistics RSS (Opens New Window) Answer (Unmark) Mark as an Answer Threads [ Previous | Next ] LDAP Export Error while integrating Microsoft Active Directory Anu malik January 12, 2014 9:10 AM RE: LDAP Export Error while integrating Microsoft Active Directory David H Nebinger January 13, 2014 7:37 AM RE: LDAP Export Error while integrating Microsoft Active Directory Anu malik January 14, 2014 1:04 AM LDAP Export Error while integrating Microsoft Active Directory January 12, 2014 9:10 AM Answer Anu malik Rank: New Member Posts: 18 Join Date: December 5, 2013 Recent Posts Hi , I have successfully done integration of LDAP . connection is working properly and liferay importing users . But while enabling Export .export is not working .getting below error. 08:43:13,985 ERROR [http-bio-8080-exec-6][BaseTransactionExecutor:38] Unable to execute transaction commit callbackcom.liferay.portal.ModelListenerException: javax.naming.directory.NoSuchAttributeException: [LDAP: error code 16 - 00000057: LdapErr: DSID-0C090C30, comment: Error in attribute conversion operation, data 0, v1db0 ]; remaining name 'sAMAccountName=ashutosh.dhamane,OU=ExternalUsers,OU=Users,OU=BTICWeb,DC=WEBIFC,DC=com' at com.liferay.portal.model.UserListener.onAfterUpdate(UserListener.java:75) at com.liferay.portal.model.UserListener.onAfterUpdate(UserListener.java:1) at com.liferay.portal.model.BaseModelListener.onAfterUpdate(BaseModelListener.java:1) at com.liferay.portal.service.persistence.impl.BasePersistenceImpl.update(BasePersistenceImpl.java:296) at sun.reflect.GeneratedMethodAccessor490.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.liferay.portal.security.lang.DoPrivilegedHandler$InvokePrivilegedExceptionAction.run(DoPrivilegedHandler.java:167) at java.security.AccessController.doPrivileged(Native Method) at com.liferay.portal.security.lang.DoPrivilegedHandler.doInvoke(DoPrivilegedHandler.java:100) at com.liferay.portal.security.lang.DoPrivilegedHandler.invoke(DoPrivilegedHandler.java:56) at com.sun.proxy.$Proxy460.update(Unknown Source) at com.liferay.portal.service.impl.UserLocalServiceImpl.updateSta