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

Re: ldap problem



You're obviously adding an entry with no parent,
because you didn't add "dc=linux,dc=lin" first.

One question: did you read the quick start guide,
by chance?

http://www.openldap.org/doc/admin22/quickstart.html

Would you mind giving it a try?  You're making
almost all the mistakes listed there, in almost
the exact sequence.  This is likely to be a strong
argument against those who dislike OpenLDAP's
documentation. At least one piece is quite focused
on the target.

p.

> hi
>    thanks a lot atleat now i m not getting this error,
> but when i add new entry i  m geting new err mesg
>
> [root@linux bin]# ./ldapadd -f /tmp/test.txt -D
> "cn=Manager,dc=linux,dc=lin" -w secret
>
> adding new entry "cn=manish arya,dc=linux,dc=lin"
>
> on xterm running ldap server i get
>
> note these lines in following message
>
> "<= bdb_dn2id: get failed: DB_NOTFOUND: No matching
> key/data pair found (-30990)
> bdb_add: entry at root denied"
>
> why am i getting this ?
> <= ldap_dn2bv(cn=manish arya,dc=linux,dc=lin,272)=0
> => ldap_dn2bv(272)
> <= ldap_dn2bv(cn=manish arya,dc=linux,dc=lin,272)=0
> <<< dnPrettyNormal: <cn=manish arya,dc=linux,dc=lin>,
> <cn=manish arya,dc=linux,dc=lin>
> ber_scanf fmt ({m{W}}) ber:
> ber_scanf fmt ({m{W}}) ber:
> ber_scanf fmt ({m{W}}) ber:
> ber_scanf fmt (}) ber:
> bdb_dn2entry("cn=manish arya,dc=linux,dc=lin")
> => bdb_dn2id( "dc=linux,dc=lin" )
> <= bdb_dn2id: get failed: DB_NOTFOUND: No matching
> key/data pair found (-30990)
> oc_check_required entry (cn=manish
> arya,dc=linux,dc=lin), objectClass "person"
> oc_check_allowed type "objectClass"
> oc_check_allowed type "cn"
> oc_check_allowed type "sn"
> oc_check_allowed type "structuralObjectClass"
> oc_check_allowed type "entryUUID"
> oc_check_allowed type "creatorsName"
> oc_check_allowed type "createTimestamp"
> oc_check_allowed type "entryCSN"
> oc_check_allowed type "modifiersName"
> oc_check_allowed type "modifyTimestamp"
> bdb_dn2entry("cn=manish arya,dc=linux,dc=lin")
> => bdb_dn2id( "dc=linux,dc=lin" )
> <= bdb_dn2id: get failed: DB_NOTFOUND: No matching
> key/data pair found (-30990)
> bdb_add: entry at root denied
> send_ldap_result: conn=26 op=1 p=3
> send_ldap_response: msgid=2 tag=105 err=32
> ber_flush: 14 bytes to sd 10
> connection_get(10): got connid=26
> connection_read(10): checking for input on id=26
> ber_get_next
> ber_get_next: tag 0x30 len 5 contents:
> ber_get_next
> ber_get_next on fd 10 failed errno=0 (Success)
> connection_read(10): input error=-2 id=26, closing.
> connection_closing: readying conn=26 sd=10 for close
> connection_close: deferring conn=26 sd=10
> do_unbind
> connection_resched: attempting closing conn=26 sd=10
> connection_close: conn=26 sd=10
>
> -Manish
>
>
> --- Pierangelo Masarati <ando@sys-net.it> wrote:
>>
>> > hi
>> >     i m veri new to ldap, in my config file i hav
>> line
>> >
>> > rootdn "cn=Manager,dc=linux,dc=lin"
>> >
>> > so in ldapadd command when i give
>> >
>> > ./ldapadd -f /tmp/test.txt -D rootdn -W
>> > Enter LDAP Password:
>> > ldap_bind: Invalid DN syntax (34)
>> >         additional info: invalid DN
>>
>> The string "rootdn" is not a valid DN as per
>> RFC2253; it needs at least
>> one attribute type and an "=" before the value;
>> however, "cn=rootdn"
>> wouldn't be valid as well because it doesn't match
>> the value you set for
>> rootdn in your slapd.conf.
>>
>> Try -D "cn=Manager,dc=linux,dc=lin", this might
>> help.
>>
>> p.
>>
>> >
>> > i mean from my config file i m creating a new dn
>> entry
>> > so do i need to mention -D option ?
>> >
>> > dn: cn=Manish,dc=linux,dc=lin
>> > objectClass: person
>> > cn: Manish
>> > sn: Arya
>> > mail: mkarya@rainbow.com
>> > uid: mkarya
>> >
>> > Ahhhhhhhhhhh..........I am all confused
>> > I am going for tea break please help !!!!!!!!
>> >
>> > -Manish
>> > LinuxIndia.net
>> > --- Pierangelo Masarati <ando@sys-net.it> wrote:
>> >>
>> >> > hi
>> >> > i am using openldap 2.2.8
>> >> > here is my slapd.conf file
>> >> >
>> >> >
>> >>
>> >
>>
> -----------------------------------------------------
>> >> > include
>> >> >
>> /shared/openldap-/etc/openldap/schema/core.schema
>> >> >
>> >> > pidfile /shared/openldap-/var/run/slapd.pid
>> >> > argsfile /shared/openldap-/var/run/slapd.args
>> >> >
>> >>
>> >
>>
> #######################################################################
>> >> > # ldbm database definitions
>> >> >
>> >>
>> >
>>
> #######################################################################
>> >> >
>> >> > database bdb
>> >> > suffix "dc=linux,dc=lin"
>> >> > rootdn "cn=Manager,dc=linux,dc=lin"
>> >> > # Cleartext passwords, especially for the
>> rootdn,
>> >> > should
>> >> > # be avoid. See slappasswd( and slapd.conf(5)
>> for
>> >> > details.
>> >> > # Use of strong authentication encouraged.
>> >> > rootpw secret
>> >> > #rootpw {CRYPT}ZPXImACgFFnW6
>> >> > # The database directory MUST exist prior to
>> >> running
>> >> > slapd AND
>> >> > # should only be accessible by the slapd and
>> slap
>> >> > tools.
>> >> > # Mode 700 recommended.
>> >> > directory /shared/openldap-/var/openldap-data
>> >> > # Indices to maintain
>> >> > index objectClass eq
>> >> > -----------------------------------------
>> >> >
>> >> > and here is my ldap.conf file
>> >> > #
>> >> > # LDAP Defaults
>> >> > #
>> >> >
>> >> > # See ldap.conf(5) for details
>> >> > # This file should be world readable but not
>> world
>> >> > writable.
>> >> >
>> >> > BASE dc=linux dc=lin
>> >> > URI ldap:// ldaps://
>> >> >
>> >> > #SIZELIMIT 12
>> >> > #TIMELIMIT 15
>> >> > #DEREF never
>> >> > ---------------------------------------
>> >> >
>> >> > i m staring ldap like this
>> >> > .........................................
>> >> > $libexec/slapd -d
>> >> > entifierMatch' APPLIES (
>> >> supportedApplicationContext $
>> >> > supportedFeatures $ supportedExtension $
>> >> > supportedControl ) )
>> >> > slapd startup: initiated.
>> >> > bdb_db_open:
>> >> > dbenv_open(/shared/openldap-/var/openldap-data)
>> >> > slapd starting
>> >> > -----------------------------------------------
>> >> >
>> >> > then when i add some user from a file
>> >> > [root@linux openldap]# cat /tmp/test.txt
>> >> > dn: cn=Manish,dc=linux,dc=lin
>> >> > objectClass: person
>> >> > cn: Manish
>> >> > sn: Arya
>> >> > title: danger ahead.....don't move
>> >> > mail: mkarya@rainbow.com
>> >> > uid: mkarya
>> >> >
>> >> >
>> >> > like
>> >> > $./ldapadd -f /tmp/test.txt -W
>> >> >
>> >> > i get error
>> >> > [root@linux bin]# ./ldapadd -f /tmp/test.txt -W
>> >> > Enter LDAP Password:
>> >> > ldap_bind: Invalid credentials (49)
>> >> >
>> >> > and on xterm running ldap i get
>> >> >
>> >> >
>> >> > connection_read(10): checking for input on id=0
>> >> > ber_get_next
>> >> > ber_get_next: tag 0x30 len 18 contents:
>> >> > ber_get_next
>> >> > ber_get_next on fd 10 failed errno=11 (Resource
>> >> > temporarily unavailable)
>> >> > do_bind
>> >> > ber_scanf fmt ({imt) ber:
>> >> > ber_scanf fmt (m}) ber:
>> >> >>>> dnPrettyNormal: <>
>> >> > <<< dnPrettyNormal: <>, <>
>> >> > do_bind: version=3 dn="" method=128
>> >>
>> >>                      ^^^^^
>> >>
>> >> you're not supplying any bind DN, so your
>> >> authentication is invalid.
>> >> read about switch -D for ldap tools (e.g. man
>> >> ldapadd(1)).
>> >>
>> >> p.
>> >>
>> >> --
>> >> Pierangelo Masarati
>> >> mailto:pierangelo.masarati@sys-net.it
>> >>
>> >>
>> >
>> >
>> >
>> >
>> >
>> > __________________________________
>> > Do you Yahoo!?
>> > Yahoo! Tax Center - File online by April 15th
>> > http://taxes.yahoo.com/filing.html
>>
>>
>> --
>> Pierangelo Masarati
>> mailto:pierangelo.masarati@sys-net.it
>>
>>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html


-- 
Pierangelo Masarati
mailto:pierangelo.masarati@sys-net.it