Google Plus

OpenLDAP error ldapadd: Undefined attribute type (17)

Written by Mel Kham on . Posted in Linux Mint

How  to  Solve  this  error :

[root@localhost openldap]# /usr/bin/ldapadd -a -x -D ‘cn=Manager,dc=ldap-kike,dc=com,dc=uy’ -W -f ldap-init.ldif
Enter LDAP Password:
ldapadd: attributeDescription “dn”: (possible missing newline after line 5 of entry “dc=ldap-kike,dc=com,dc=uy”?)
adding new entry “dc=ldap-kike,dc=com,dc=uy”
ldapadd: Undefined attribute type (17)
additional info: dn: attribute type undefined

 

Solution  :

You need an empty line before each line starting with “dn:”
LDIF separates entries by blank lines.
dn: denotes the distinguished name of an entry and
needs to be the first line of each entry.
example :

 

###EMPTY line
dn: dc=ldap-kike,dc=com,dc=uy
objectclass: dcObject
objectclass: organization
o: Servidor LDAP ldap-kike
dc: ldap-kike
###EMPTY line
dn: cn=Manager,dc=ldap-kike,dc=com,dc=uy
objectclass: organizationalRole
cn: Manager

 

save  and  exit , restart  ldap      and  try  again

 

 

[root@localhost openldap]# /etc/init.d/ldap start
Checking configuration files for slapd:  config file testing succeeded[  OK  ]
Starting slapd:                                                                          [  OK  ]

 

[root@localhost openldap]# /usr/bin/ldapadd -a -x -D ‘cn=Manager,dc=ldap-kike,dc=com,dc=uy’ -W -f ldap-init.ldif
Enter LDAP Password:
adding new entry “dc=ldap-kike,dc=com,dc=uy”

adding new entry “cn=Manager,dc=ldap-kike,dc=com,dc=uy”

[root@localhost openldap]#

For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • Dangducduynt

    thanks very much for your help

  • http://openid.aol.com/McDutchie MD

    THANK YOU! The “Quick Start Guide” in the OpenLDAP Administrator’s Guide does not specify the need for these newlines so I’ve spent the past hour Googling for this problem. Eventually I found this page. Problem solved.

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

SK

|

I am working on it. Stay tuned. Thanks for the comment.

adriana rizzati

|

You are right, I saw them just now and they are awesome!

SK

|

Thanks for the comment Abdullah. Stay tuned with us always.

Abdullah Musazai

|

Thank you for such a great service you always do, hope you gain more power and more energy to work more & more

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .