Ian,
        Try ldapadd -x -h localhost -D "cn=mailadmin,dc=global-drum,dc=com" -W -f /srv/ox/share/init_ldap.ldif and see if this works. Notice the DN after the -D is in double quotes. Also, if you have the HOSTS (which is depreciated) or URI (which is the new way of defining providers) defined in your /etc/openldap/ldap.conf file you do not need to define the -h localhost in the ldapadd or ldapsearch commands.

Regards,

David Damon

Senior Systems Integration Analyst




"Ian Moroney" <ian.moroney@techdivision.co.uk>

Sent by: openldap-software-bounces+ddamon=baxglobal.com@openldap.org

02/07/2007 07:09 AM

To
<openldap-software@openldap.org>
cc
Subject
Invalid DN





Hi again all!
Just another brick wall i've ran into...
 
I am running the following command:
ldapadd -x -h localhost -D cn=mailadmin,dc=global-drum,dc=com -W -f /srv/ox/share/init_ldap.ldif
I then get:
ldap_bind: Invalid DN syntax (34)
 additional info: invalid DN
 
This error happens if i have UID=mailadmin,dc=global-drum,dc=com, cn=root.... cn=mailadmin or whatever.
 
if necessary, i can post the contents of the init_ldap.ldif and my slapd.conf files.
 
ldapsearch -h localhost -D "UID=mailadmin,dc=global-drum,dc=com" -x -W
(after password enter)
comes back with:
 
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
 
# search result
search: 2
result: 32 No such object
 
# numResponses: 1
 
and when i look at slapd -d -1, it is showing the following, amongst other things:
ldap_read: want=8, got=7
 0000: 30 05 02 01 03 42 00
ber_get_next: tag 0x39 len 5 contents:
ber_dump: buf=0x80268b80 ptr=0x80268b80 end=0x80268b85 len=5
 0000: 02 01 03 42 00
ber_get_next
ldap_read: want=8 error=Resource temporarily unavailable
ber_get_next on fd 16 failed errno=11 (Resource temporarily unavailable)
 
The database is supposed to be empty, so maybe it should be reporting what it is reporting above.
Thoughts?
 
Thanks and Kind Regards,
 
Ian Moroney
Field Engineer
 
T: 020 8891 3010
M: 07791 965924
F: 020 8288 2591
www.techdivision.co.uk
 
TechDivision - Making IT Work