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

Search by customized attribute in OpenLdap

Hi, I've installed OpenLdap, and defiened the following schema:

attributetype ( 1.2.840.113556.1.4.221
        NAME 'sAMAccountName'
        SYNTAX ''
        SINGLE-VALUE )
objectclass ( 1.2.840.113556.1.5.6
        NAME 'securityPrincipal'
        SUP top
        MUST (sAMAccountName )
        MAY (mail))

I've created an entry as follows:

dn: cn=John Smith,ou=External Users,dc=xxx,dc=yyy,dc=com
cn: John Smith
objectClass: person
objectClass: securityPrincipal
mail: test@test.com
sn: Smith
userPassword: myPassword
sAMAccountName: smith

Then I try to get the entry looking for (sAMAccountName='smith'), but it doesn't work. If I look for (cn='John Smith') it founds the entry. So what do I need to do in order to be able to search by sAMAccountName?