I am trying to set up Apache DS to simulate my company Active Directory locally. I have created a new partition to match. I then created an ldif file to add users and groups. e.g.
##Create the root domain
dn: dc=serverfault,dc=com
objectClass: domain
objectClass: top
dc: serverfault
##Create Users and Groups roots
dn: ou=Users,dc=serverfault,dc=com
objectClass: organizationalUnit
objectClass: top
ou: Users
dn: ou=Groups,dc=serverfault,dc=com
objectClass: organizationalUnit
objectClass: top
ou: Groups
##Add users
dn: cn=Jeff Atwood,ou=Users,dc=serverfault,dc=com
objectclass: inetOrgPerson
cn: Jeff Atwood
sn: Atwood
userPrincipalName: [email protected]
dn: cn=Joel Spolsky,ou=Users,dc=serverfault,dc=com
objectclass: inetOrgPerson
cn: Joel Spolsky
sn: Spolsky
userPrincipalName: [email protected]
##Add groups
dn: CN=Dev,ou=Groups,dc=serverfault,dc=com
objectClass: groupOfNames
cn: Dev
member: cn=Jeff Atwood,ou=Users,dc=serverfault,dc=com
member: cn=Joel Spolsky,ou=Users,dc=serverfault,dc=com
However, this fails because ATTRIBUTE_TYPE for OID userprincipalname does not exist!
. (If I take out the userPrincipalName lines everything is fine).
It is listed as an attribute on the Microsoft site https://msdn.microsoft.com/en-us/library/ms682282(v=vs.85).aspx which makes me think that it is just not included in the default Schema in ApacheDS.
I'd rather not manually add each failed attribute or object class using the GUI.
Is there a way to script it, similar to using ldif?