[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldapadd: peroblems with an very weird error (invalid format)



Hello. For evryone.
I try to mount my ldap directory. but i get an weird error. ldapadd: invalid format (line 2) entry: "dc=terminalquequen,dc=com,dc=ar"
i follow all rules on creation of ldif file, but my ldap fails.
i'm using debian sarge (stable) aptitude install by default ldap-2.2.23-8


may slapd.conf is


$ cat /etc/ldap/slapd.conf
# This is the main slapd configuration file. See slapd.conf(5) for more
# info on the configuration options.

#######################################################################
# Global Directives:

# Features to permit
#allow bind_v2

# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema

# Schema check allows for forcing entries to
# match schemas for their objectClasses's
schemacheck     on

# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd.args

# Read slapd.conf(5) for possible values
loglevel        0

# Where the dynamically loaded modules are stored
modulepath      /usr/lib/ldap
moduleload      back_bdb
#moduleload      back_ldbm

#######################################################################
# Specific Backend Directives for bdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend         bdb
checkpoint 512 30


##################################################
###### CONFIGURACION BD ELEVADOR
##################################################
##################################################
database        bdb
directory       /var/lib/ldap/agenda
suffix          "ou=agenda,dc=terminalquequen,dc=com,dc=ar"
rootdn          "cn=admin,ou=agenda,dc=terminalquequen,dc=com,dc=ar"
rootpw          {SSHA}xxxxxxxxxxxxxxxxxx
lastmod on
index   objectClass     eq
index   cn,sn,email     eq,pres,sub
# a que/por quien/y como
access to *
       by dn="cn=admin,ou=agenda,dc=terminalquequen,dc=com,dc=ar" write
       by anonymous auth
       by * read

##################################################
###### FIN CONFIGURACION ELEVADOR
##################################################
##################################################


#######################################################################
# Specific Backend Directives for 'other':
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
#backend                <other>

#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        bdb

# The base of your directory in database #1
suffix          "dc=terminalquequen,dc=com,dc=ar"

# Where the database file are physically stored for database #1
directory       "/var/lib/ldap"

# Indexing options for database #1
index           objectClass eq
index           mail,sn,cn,uid  eq,sub,pres
# Save the time that the entry gets modified, for database #1
lastmod         on

# Where to store the replica logs for database #1
# replogfile    /var/lib/ldap/replog

# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
access to attrs=userPassword
       by dn="cn=admin,dc=terminalquequen,dc=com,dc=ar" write
       by anonymous auth
       by self write
       by * none

# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work
# happily.
access to dn.base="" by * read

# The admin dn has full write access, everyone else
# can read everything.
access to *
       by dn="cn=admin,dc=terminalquequen,dc=com,dc=ar" write
       by * read

# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
#        by dn="cn=admin,dc=terminalquequen,dc=com,dc=ar" write
#        by dnattr=owner write

#######################################################################
# Specific Directives for database #2, of type 'other' (can be bdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database        <other>

# The base of your directory for database #2
#suffix         "dc=debian,dc=org"



MY LDIF file
$ cat inicio.ldif
dn: dc=terminalquequen,dc=com,dc=ar
objectClass top
objectClass dcObject
objectClass organization
dc: terminalquequen
o: TerminalQuequenSA
description: Elevador de granos

dn: ou=agenda,dc=terminalquequen,dc=com,dc=ar
objectClass organizationalUnit
ou: agenda




and i get a weird error executing this command

$ ldapadd -x -W -D "cn=admin,dc=terminalquequen,dc=com,dc=ar" -f inicio.ldif -d 2048
Enter LDAP Password:xxxxx
request 1 done
ldif_parse_line: missing ':' after
ldapadd: invalid format (line 2) entry: "dc=terminalquequen,dc=com,dc=ar"

$ ldapadd -x -W -D "cn=admin,dc=terminalquequen,dc=com,dc=ar" -f inicio.ldif -d 1
ldap_create
Enter LDAP Password: xxxxxx
ldap_bind_s
ldap_simple_bind_s
ldap_sasl_bind_s
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: TCP localhost:389
ldap_new_socket: 4
ldap_prepare_socket: 4
ldap_connect_to_host: Trying 127.0.0.1:389
ldap_connect_timeout: fd: 4 tm: -1 async: 0
ldap_ndelay_on: 4
ldap_is_sock_ready: 4
ldap_ndelay_off: 4
ldap_open_defconn: successful
ldap_send_server_request
ber_flush: 62 bytes to sd 4
ldap_result msgid 1
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
wait4msg (infinite timeout), msgid 1
wait4msg continue, msgid 1, all 1
** Connections:
* host: localhost  port: 389  (default)
 refcnt: 2  status: Connected
 last used: Tue Oct 10 20:52:46 2006

** Outstanding Requests:
* msgid 1,  origid 1, status InProgress
  outstanding referrals 0, parent count 0
** Response Queue:
  Empty
ldap_chkResponseList for msgid=1, all=1
ldap_chkResponseList returns NULL
ldap_int_select
read1msg: msgid 1, all 1
ber_get_next
ber_get_next: tag 0x30 len 12 contents:
ldap_read: message type bind msgid 1, original id 1
ber_scanf fmt ({iaa) ber:
read1msg:  0 new referrals
read1msg:  mark request completed, id = 1
request 1 done
res_errno: 0, res_error: <>, res_matched: <>
ldap_free_request (origid 1, msgid 1)
ldap_free_connection
ldap_free_connection: refcnt 1
ldap_parse_result
ber_scanf fmt ({iaa) ber:
ber_scanf fmt (}) ber:
ldap_msgfree
ldapadd: invalid format (line 2) entry: "dc=terminalquequen,dc=com,dc=ar"
ldap_free_connection
ldap_send_unbind
ber_flush: 7 bytes to sd 4
ldap_free_connection: actually freed

$ ldapadd -x -W -D "cn=admin,dc=terminalquequen,dc=com,dc=ar" -f inicio.ldif -d 2048 -S error
Enter LDAP Password:
request 1 done
ldif_parse_line: missing ':' after
ldapadd: invalid format (line 2) entry: "dc=terminalquequen,dc=com,dc=ar"

$ cat error
# Error: Bad parameter to an ldap routine (-9)
dn: dc=terminalquequen,dc=com,dc=ar
objectClass top
objectClass dcObject
objectClass organization
dc: terminalquequen
o: TerminalQuequenSA
description: Elevador de granos

Any help will apreciate. Thanks for you time.


Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
Probalo ya!