Hi Joshua
And without -ZZ, mean ldaps research in local server ?
Reagrds
Karim Bourenane Orange Business Services / Equant RO&SI / IBNF / ENO / GNS 112 Avenue Charles de Gaules 92200 Neuilly S/Seine Phone: +33156 76 35 52 Fax: +33156 76 35 04 http://www.equant.com
joshua@itsecureadmin.com Sent by: openldap-technical-bounces+karim.bourenane=orange-ftgroup.com@OpenLDAP.org 12/06/2008 17:01
To: openldap-technical@openldap.org cc: bcc: Subject: help with ldapsearch on uid
Hello,
I am using OpenLDAP 2.4.9 on CentOS 5.1 (32 bit) with a custom schema and I have added ~7500 objects and I am not able to search successfully for these objects by uid. What must I do to be able to search for these objects by uid?
Sample object:
# 496user, People, example.com dn: uid=496user,ou=People,dc=example,dc=com objectClass: mailAccount maildrop: 496user@nest.tld mailid: 496user@nest.tld maildir: 496user/ userPassword:: secret mailquota: 35969216S
If I search for this user by uid, I will get no results back:
# ldapsearch -xZZ -b "ou=people,dc=example,dc=com" uid=496user # extended LDIF # # LDAPv3 # base <ou=people,dc=example,dc=com> with scope subtree # filter: uid=496user # requesting: ALL #
# search result search: 3 result: 0 Success
# numResponses: 1
Searching by mailid does work:
# ldapsearch -xZZ -b "ou=people,dc=example,dc=com" mailid=496user@nest.tld ...<snip>... dn: uid=496user,ou=People,dc=example,dc=com objectClass: mailAccount maildrop: 496user@nest.tld mailid: 496user@nest.tld maildir: 496user/ userPassword:: secret mailquota: 35969216S
# search result search: 3 result: 0 Success
# numResponses: 2 # numEntries: 1
The schema is as follows (downloaded from riseuplabs.org):
objectIdentifier OID 1.1 objectIdentifier ldapOID OID:2 objectIdentifier attributetypeOID ldapOID:1 objectIdentifier objectclassOID ldapOID:2
attributeType ( attributetypeOID:1 NAME 'mailAddress' DESC 'email address(es)' EQUALITY caseIgnoreMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
attributeType ( attributetypeOID:2 NAME 'maildrop' DESC 'Mail addresses where mail is delivered -- ie forwards' SUP mailAddress )
attributeType ( attributetypeOID:3 NAME 'mailid' DESC 'Mail addresses accepted by this account -- ie aliases' SUP mailAddress )
attributeType ( attributetypeOID:4 NAME 'mailquota' DESC 'Bytes of mail quota' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} SINGLE-VALUE )
attributetype ( attributetypeOID:5 NAME 'maildir' DESC 'where mail is stored' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} SINGLE-VALUE )
objectclass ( objectclassOID:1 NAME 'mailAccount' DESC 'users who receive mail' AUXILIARY MAY (maildrop $ mailid $ mailquota $ maildir) )
TIA, Josh Miller, RHCE