LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ldap syntax wrong ? (https://www.linuxquestions.org/questions/linux-newbie-8/ldap-syntax-wrong-877760/)

jonaskellens 04-29-2011 01:45 AM

Ldap syntax wrong ?
 
Hello,

what is wrong with the following ldif file :

Code:

dn: dc=mydomain
objectclass: dcObject
objectclass: organization
o: My Ldap
dc: mydomain

dn: cn=Manager,dc=mydomain
objectclass: organizationalRole
cn: Manager

Because I get following output :
Code:

[root@1 ~]# /usr/bin/ldapadd -x -D "cn=Manager,dc=mydomain" -W -f /etc/openldap/basic.ldif
Enter LDAP Password:
adding new entry "dc=mydomain"
ldapadd: Invalid syntax (21)
        additional info: objectclass: value #0 invalid per syntax


omgs 04-29-2011 03:58 AM

Are you trying to recreate the root LDAP tree? If not and it exists, then you only have to put in the file the new entries (regardless the error message is accurate or not). If so, then you should use slapcat/slapadd with ldap stopped.

You can take a look at "man ldapadd" or the relevan man pages for examples.


All times are GMT -5. The time now is 12:43 PM.