Hello all,
I am getting this very annoying error when ever I try to add to lapd. I had the server running, and accepting connections, I was also able to add users...etc. My setup is simple, I am using LDAP to authenticate users for Horde. I made a mistake in the Horde config, and had to use ldapmodify to correct the issue. After some tinkering I made the mistake again, and had to run ldapmodify again. The next time I tried to add something I get ldap_add: No such object (32). I looked over my config and ldif files about 60 times, and even re-installed openldap. I have been searching Google all day for answers to this problem, but nothing has worked.
I am using Freebsd 6.1, with OpenLdap 2.3
Here is my slapd.conf file... # # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. # include /usr/local/etc/openldap/schema/core.schema include /usr/local/etc/openldap/schema/corba.schema include /usr/local/etc/openldap/schema/cosine.schema include /usr/local/etc/openldap/schema/dyngroup.schema include /usr/local/etc/openldap/schema/inetorgperson.schema include /usr/local/etc/openldap/schema/java.schema include /usr/local/etc/openldap/schema/misc.schema include /usr/local/etc/openldap/schema/nis.schema include /usr/local/etc/openldap/schema/openldap.schema include /usr/local/etc/openldap/schema/ppolicy.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory # service AND an understanding of referrals. #referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args
# Load dynamic backend modules: modulepath /usr/local/libexec/openldap moduleload back_bdb # moduleload back_ldap # moduleload back_ldbm # moduleload back_passwd # moduleload back_shell
# Sample security restrictions # Require integrity protection (prevent hijacking) # Require 112-bit (3DES or better) encryption for updates # Require 63-bit encryption for simple bind # security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy: # Root DSE: allow anyone to read it # Subschema (sub)entry DSE: allow anyone to read it # Other DSEs: # Allow self write access # Allow authenticated users read access # Allow anonymous users to authenticate # Directives needed to implement policy: # access to dn.base="" by * read # access to dn.base="cn=Subschema" by * read # access to * # by self write # by users read # by anonymous auth # # if no access controls are present, the default policy # allows anyone and everyone to read anything but restricts # updates to rootdn. (e.g., "access to * by * read") # # rootdn can always read and write EVERYTHING!
####################################################################### # BDB database definitions #######################################################################
database bdb suffix "dc=nerdbot,dc=net" rootdn "cn=root,dc=nerdbot,dc=net" # Cleartext passwords, especially for the rootdn, should # be avoid. See slappasswd(8) and slapd.conf(5) for details. # Use of strong authentication encouraged. rootpw {SSHA}NdX6sbPuOHZl4xuzStv5DnyI1pcfIWYM # The database directory MUST exist prior to running slapd AND # should only be accessible by the slapd and slap tools. # Mode 700 recommended. directory /var/db/openldap-data # Indices to maintain index objectClass eq
and my ldif...
dn: ou=DSA,dc=nerdbot,dc=net objectclass: organizationalUnit ou: DSA
dn: cn=horde,ou=DSA,dc=nerdbot,dc=net objectclass: organizationalRole objectClass: top objectClass: simpleSecurityObject userPassword: supersecretpassword cn: horde
dn: ou=horde,dc=nerdbot,dc=net objectclass: organizationalUnit ou: horde
dn: ou=users,ou=horde,dc=nerdbot,dc=net objectclass: organizationalUnit ou: users
dn: uid=administrator,ou=users,ou=horde,dc=nerdbot,dc=net objectclass: shadowaccount objectclass: inetorgperson uid: administrator cn: Administrator sn: Administrator userpassword: supersecretpassword
dn: ou=groups,ou=horde,dc=nerdbot,dc=net objectclass: organizationalUnit ou: groups
and the command I used to add it...
ldapadd -x -h localhost -D "cn=root,dc=nerdbot,dc=net" -f horde.ldif -W
I have tried many different combinations, adding the includes (as you can see in the .conf) and trying different things with ldif, but nothing will work. However, it worked earlier! I do not understand what might be the problem. Here is what the log file says...
Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 fd=11 ACCEPT from IP=::1 50584 (IP=:: 389) Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=0 BIND dn="cn=root,dc=nerdbot,dc=net" method=128 Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=0 BIND dn="cn=root,dc=nerdbot,dc=net" mech=SIMPLE ssf=0 Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=0 RESULT tag=97 err=0 text= Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=1 ADD dn="ou=DSA,dc=nerdbot,dc=net" Jan 9 18:47:53 shadowfax slapd[99163]: is_entry_objectclass("", " 2.16.840.1.113730.3.2.6") no objectClass attribute Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=1 RESULT tag=105 err=32 text= Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=2 UNBIND Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 fd=11 closed ()
and here is what the terminal says...
Enter LDAP Password: adding new entry "ou=DSA,dc=nerdbot,dc=net" ldap_add: No such object (32)
Does anyone know what is going on? Thanks in advance.
-steve
You need to add an entry for dc=nerdbot,dc=net. You are trying to add branches to a tree with no root.
Matt
On 1/9/07, Steve Olisar steveo275@gmail.com wrote:
Hello all,
I am getting this very annoying error when ever I try to add to lapd. I had the server running, and accepting connections, I was also able to add users...etc. My setup is simple, I am using LDAP to authenticate users for Horde. I made a mistake in the Horde config, and had to use ldapmodify to correct the issue. After some tinkering I made the mistake again, and had to run ldapmodify again. The next time I tried to add something I get ldap_add: No such object (32). I looked over my config and ldif files about 60 times, and even re-installed openldap. I have been searching Google all day for answers to this problem, but nothing has worked.
I am using Freebsd 6.1, with OpenLdap 2.3
Here is my slapd.conf file... # # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. # include /usr/local/etc/openldap/schema/core.schema include /usr/local/etc/openldap/schema/corba.schema include /usr/local/etc/openldap/schema/cosine.schema include /usr/local/etc/openldap/schema/dyngroup.schema include /usr/local/etc/openldap/schema/inetorgperson.schema include /usr/local/etc/openldap/schema/java.schema include /usr/local/etc/openldap/schema/misc.schema include /usr/local/etc/openldap/schema/nis.schema include /usr/local/etc/openldap/schema/openldap.schema include /usr/local/etc/openldap/schema/ppolicy.schema
# Define global ACLs to disable default read access.
# Do not enable referrals until AFTER you have a working directory # service AND an understanding of referrals. #referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid argsfile /var/run/openldap/slapd.args
# Load dynamic backend modules: modulepath /usr/local/libexec/openldap moduleload back_bdb # moduleload back_ldap # moduleload back_ldbm # moduleload back_passwd # moduleload back_shell
# Sample security restrictions # Require integrity protection (prevent hijacking) # Require 112-bit (3DES or better) encryption for updates # Require 63-bit encryption for simple bind # security ssf=1 update_ssf=112 simple_bind=64
# Sample access control policy: # Root DSE: allow anyone to read it # Subschema (sub)entry DSE: allow anyone to read it # Other DSEs: # Allow self write access # Allow authenticated users read access # Allow anonymous users to authenticate # Directives needed to implement policy: # access to dn.base="" by * read # access to dn.base="cn=Subschema" by * read # access to * # by self write # by users read # by anonymous auth # # if no access controls are present, the default policy # allows anyone and everyone to read anything but restricts # updates to rootdn. (e.g., "access to * by * read") # # rootdn can always read and write EVERYTHING!
####################################################################### # BDB database definitions #######################################################################
database bdb suffix "dc=nerdbot,dc=net" rootdn "cn=root,dc=nerdbot,dc=net" # Cleartext passwords, especially for the rootdn, should # be avoid. See slappasswd(8) and slapd.conf(5) for details. # Use of strong authentication encouraged. rootpw {SSHA}NdX6sbPuOHZl4xuzStv5DnyI1pcfIWYM # The database directory MUST exist prior to running slapd AND # should only be accessible by the slapd and slap tools. # Mode 700 recommended. directory /var/db/openldap-data # Indices to maintain index objectClass eq
and my ldif...
dn: ou=DSA,dc=nerdbot,dc=net objectclass: organizationalUnit ou: DSA
dn: cn=horde,ou=DSA,dc=nerdbot,dc=net objectclass: organizationalRole objectClass: top objectClass: simpleSecurityObject userPassword: supersecretpassword cn: horde
dn: ou=horde,dc=nerdbot,dc=net objectclass: organizationalUnit ou: horde
dn: ou=users,ou=horde,dc=nerdbot,dc=net objectclass: organizationalUnit ou: users
dn: uid=administrator,ou=users,ou=horde,dc=nerdbot,dc=net objectclass: shadowaccount objectclass: inetorgperson uid: administrator cn: Administrator sn: Administrator userpassword: supersecretpassword
dn: ou=groups,ou=horde,dc=nerdbot,dc=net objectclass: organizationalUnit ou: groups
and the command I used to add it...
ldapadd -x -h localhost -D "cn=root,dc=nerdbot,dc=net" -f horde.ldif -W
I have tried many different combinations, adding the includes (as you can see in the .conf) and trying different things with ldif, but nothing will work. However, it worked earlier! I do not understand what might be the problem. Here is what the log file says...
Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 fd=11 ACCEPT from IP=::1 50584 (IP=:: 389) Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=0 BIND dn="cn=root,dc=nerdbot,dc=net" method=128 Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=0 BIND dn="cn=root,dc=nerdbot,dc=net" mech=SIMPLE ssf=0 Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=0 RESULT tag=97 err=0 text= Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=1 ADD dn="ou=DSA,dc=nerdbot,dc=net" Jan 9 18:47:53 shadowfax slapd[99163]: is_entry_objectclass("", " 2.16.840.1.113730.3.2.6") no objectClass attribute Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=1 RESULT tag=105 err=32 text= Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 op=2 UNBIND Jan 9 18:47:53 shadowfax slapd[99163]: conn=3 fd=11 closed ()
and here is what the terminal says...
Enter LDAP Password: adding new entry "ou=DSA,dc=nerdbot,dc=net" ldap_add: No such object (32)
Does anyone know what is going on? Thanks in advance.
-steve
openldap-software@openldap.org