-
Notifications
You must be signed in to change notification settings - Fork 59
Description
We're trying to use ldap-server in our CI loops and we want to test both LDAPs and ADs that use either the uid or sAMAccountName as the user Id attribute. We'd like to be able to test both scenarios with one LDIF configuration. I was hoping to simply add sAMAccountName as an attribute, but the service fails to start with the following error:
The attribute 'samaccountname' cannot be stored
Exception in thread "main" org.apache.directory.api.ldap.model.exception.LdapNoSuchAttributeException: ERR_04269 ATTRIBUTE_TYPE for OID samaccountname does not exist!
Here's the LDIF that we're trying to use:
version: 1
dn: ou=TestProg,o=TestCompany,l=TestCity
objectClass: organizationalUnit
objectClass: top
ou: TestProg
dn: cn=progtestuser,ou=TestProg,o=TestCompany,l=TestCity
objectClass: person
objectclass: organizationalPerson
objectClass: inetOrgPerson
cn: progtestuser
sn: progtestuser
uid: progtestuser
sAMAccountName: progtestuser
mail: progtestuser@testcompany.com
userPassword: itachi123%^)
description: EMAILADDRESS=TestProgTeam@testcompany.com, CN=TestProgTestUser, OU=TestProg, O=TestCompany, L=TestCity, ST=NY, C=US
description: 1.2.840.113549.1.9.1=#161648796472615465616d404c334861727269732e636f6d,CN=TestProgTestUser,OU=TestProg,O=TestCompany,L=TestCity,ST=NY,C=US
dn: cn=progtestadmin,ou=TestProg,o=TestCompany,l=TestCity
objectClass: person
objectclass: organizationalPerson
objectClass: inetOrgPerson
cn: progtestadmin
sn: progtestadmin
uid: progtestadmin
sAMAccountName: progtestadmin
mail: progtestadmin@testcompany.com
userPassword: prog99
dn: ou=Group,o=TestCompany,l=TestCity
objectClass: organizationalUnit
objectClass: top
ou: Group
dn: cn=prog-admin,ou=Group,o=TestCompany,l=TestCity
objectClass: top
objectClass: groupOfNames
cn: prog-admin
member: cn=progtestadmin,ou=TestProg,o=TestCompany,l=TestCity
dn: cn=prog-base,ou=Group,o=TestCompany,l=TestCity
objectClass: top
objectClass: groupOfNames
cn: prog-base
member: cn=progtestuser,ou=TestProg,o=TestCompany,l=TestCity