[turba] ldap add contact error - object class violation

Joe Cave Joe at tendocom.com
Wed Mar 12 16:29:46 PST 2003


hello,
i posted with this problem about a month ago, didn't get any responses, re-did my horde setup, still having same prob so now i'm trying again. i think i must be missing something simple...  i'm trying to get a turba personal address book working with an ldap backend but seem to be having problems adding new contacts. also, i can use the preferences-based address book so i know horde is talking to ldap correctly.

when i try and add a contact i get an object class violation that looks like:

HORDE [error] [turba] Failed to add an object: [65] "Object class violation" (attributes: [a:3:{s:2:"cn";s:4:"test";s:4:"mail";s:13:"test at test.com";s:11:"objectclass";a:3:{i:0;s:6:"person";i:1;s:11:"pilotPerson";i:2;s:20:"organizationalPerson";}}]). [on line 41 of "/usr/local/apache/htdocs/mail/horde/turba/addobjectaction.php"]

within turba i get a generic "contact your sysadmin" message (which is the line 41 ref'd above). the above error is out of the horde.log.

here's the ldap log: 

[ID 513112 local4.debug] conn=5 op=1 ADD dn="cn=test,ou=personal_addressbook,uid=joe,ou=accounts,dc=ld,dc=dir"

[ID 217296 local4.debug] conn=5 op=1 RESULT tag=105 err=65 text=invalid structural object class chain (pilotPerson/organizationalPerson)

the "invalid structual object class chain" is mentioned in the list archive here:

http://lists.horde.org/archives/horde/Week-of-Mon-20021202/004616.html

but seems to only apply to having openldap's schemacheck on. i've tried with it on and off with the same results except that with schemacheck off the ldap log doesn't log the: text=invalid structural object...etc.. it just logs: text=

here's my setup:

- openldap 2.1.12 on solaris
- horde/imp/turba stable versions as of yesterday (i had new cvs before and had same probs)
- ldap schemas are added/patched with horde/turba data

here's the relevant sources.php info:

$uid = Auth::getAuth();
// preg_match('/(^.*)@/', $uid, $uid);
// $uid = $uid[1];
$basedn = 'ou=accounts, dc=ld, dc=dir';
$cfgSources['personal_ldap'] = array(
    'title' => 'My Addressbook',
    'type' => 'ldap',
    'params' => array(
        'server' => 'localhost',
        'root' => 'ou=personal_addressbook,uid=' . $uid . ',' . $basedn,
        'bind_dn' => 'uid=' . $uid . ',' . $basedn,
        'bind_password' => Auth::getCredential('password'),
        'dn' => array('cn', 'uid'),
        'objectclass' => array('person',
                               'pilotPerson',
                               'organizationalPerson'),
        'encoding' => 'utf8',
        'version' => 3
<--snip>

now the 2nd/3rd lines are commented out because i don't use the user at domain.xxx syntax. i only use a plain username. could this be the problem? it seems to work ok as far as connecting to the address book and such. i'd like to keep the username without the @domain syntax if possible.

here's my ldap user entry:

# joe, accounts, ld.dir
dn: uid=joe,ou=accounts,dc=ld,dc=dir
sn: joe
cn: joe cave
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: qmailUser
objectClass: hordePerson
mail: joe at netwrek.net
mailMessageStore: /var/qmail/maildirs/joe
mailHost: bandit
uid: joe
userPassword:: bGRhcGxkYXA=
ou: personal_addressbook
<--snip>

thats about all i can think of. like i said, horde/imp work fine with ldap and i can use the preferences-based turba so it seems like i'm only a step away. sorry if this email is huge but i'm really stumped here. hopefully someone can shed some light on my problem... tia.

- j





More information about the turba mailing list