[phpldapadmin] 0x41 (LDAP_OBJECT_CLASS_VIOLATION)
François Mehault <[email protected]>
| Newsgroups | gmane.comp.ldap.davedap |
|---|---|
| Message-ID | <[email protected]> |
Hi all
I am a beginner with openldap and phpldapadmin. I just install both on my FreeBSD 7. I configure my slapd.conf, I launch the daemon, I put some entries with ldapadd command. I launch phpldapadmin on my navigator. I enter the pass for rootdn. Then I am logged, all is fine. I can see my root, my entries. So I clicked on « create new entry », I selected User account, I entered good information and clicked on create. Then I have this message :
Impossible d'ajouter l'objet au serveur LDAP.
LDAP dit ::
Object class violation
Erreur numéro ::
0x41 (LDAP_OBJECT_CLASS_VIOLATION)
Description:
You tried to perform an operation that would cause an undefined attribute to exist or that would remove a required attribute, given the current list of ObjectClasses. This can also occur if you do not specify a structural objectClass when creating an entry, or if you specify more than one structural objectClass.
But I can create a organizationalUnit. What's wrong ?
My slapd.conf :
include /usr/local/etc/openldap/schema/core.schema
include /usr/local/etc/openldap/schema/cosine.schema
include /usr/local/etc/openldap/schema/inetorgperson.schema
#Radius
include /usr/local/etc/openldap/schema/RADIUS-LDAPv3.schema
schemascheck on
# 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
#loglevel 4
# Load dynamic backend modules:
modulepath /usr/local/libexec/openldap
moduleload back_bdb
#Basic ACL
access to attrs=userPassword
by self write
by anonymous auth
by dn="cn=root,dc=toto,dc=fr" write
by * none
access to *
by dn="cn=root,dc=toto,dc=fr" write
by * read
#######################################################################
# BDB database definitions
#######################################################################
database bdb
suffix "dc=toto,dc=fr"
rootdn "cn=root,dc= toto,dc=fr"
# Cleartext passwords, especially for the rootdn, should
# be avoid. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
#rootpw secret
rootpw {SSHA}ERk1pX08CCoUT2Hixj/kR9Zx8NpJmx+0
# 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
My config.php :
$config->custom->debug['syslog'] = true;
$config->custom->debug['file'] = '/tmp/pla_debug.log';
$i=0;
$ldapservers = new LDAPServers;
$ldapservers->SetValue($i,'server','name',Toto LDAP Server');
$ldapservers->SetValue($i,'server','host','127.0.0.1');
$ldapservers->SetValue($i,'server','port',389);
$ldapservers->SetValue($i,'server','base',array('dc=toto,dc=fr'));
$ldapservers->SetValue($i,'login','anon_bind',false);
$friendly_attrs = array();
$friendly_attrs['facsimileTelephoneNumber'] = 'Fax';
$friendly_attrs['telephoneNumber'] = 'Phone';
$friendly_attrs['uid'] = 'User Name';
$q=0;
$queries = array();
/* The name that will appear in the simple search form */
$queries[$q]['name'] = 'User List';
/* The base to search on */
$queries[$q]['base'] = 'dc=example,dc=com';
/* The search scope (sub, base, one) */
$queries[$q]['scope'] = 'sub';
/* The LDAP filter to use */
$queries[$q]['filter'] = '(&(objectClass=posixAccount)(uid=*))';
/* The attributes to return */
$queries[$q]['attributes'] = 'cn, uid, homeDirectory, telephonenumber, jpegphoto';
/* If you want to configure more pre-defined queries, copy and paste the above (including the "$q++;") */
$q++;
$queries[$q]['name'] = 'Samba Users';
$queries[$q]['base'] = 'dc=example,dc=com';
$queries[$q]['scope'] = 'sub';
$queries[$q]['filter'] = '(&(|(objectClass=sambaAccount)(objectClass=sambaSamAccount))(objectClass=posixAccount)(!(uid=*$)))';
$queries[$q]['attributes'] = 'uid, smbHome, uidNumber';
$q++;
$queries[$q]['name'] = 'Samba Computers';
$queries[$q]['base'] = 'dc=example,dc=com';
$queries[$q]['scope'] = 'sub';
$queries[$q]['filter'] = '(&(objectClass=sambaAccount)(uid=*$))';
$queries[$q]['attributes'] = 'uid, homeDirectory';
?>
If someone can help me, thanks.
Regards,
François
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
______________________________________
phpLDAPadmin development mailing list.
To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel
http://phpldapadmin.sourceforge.net/