I use the email of my users in my LDAP class as a 'must':
// schema.ldif objectClasses: ( 2.25.XXXX.3 NAME 'user' SUP inetOrgPerson STRUCTURAL MUST mail MAY ( XXX ) )
And my user are stored in my ldap with the DN:
For different reasons, I would like to now use an userId for the Dn, so my schema will look like this:
// schema.ldif objectClasses: ( 2.25.XXXX.3 NAME 'user' SUP inetOrgPerson STRUCTURAL MUST (mail, userid) MAY (XXX) )
And so the DN would now look like that (mail being a must but not used in the Dn):
How can I do that? Is there a procedure to migrate an object class from one schema to another?
I can code a migration procedure in my program so that it iterates on all entries and fills that userId correctly, but I couldn't find anything about that in LDAP documentation.
Another idea is to make the userId a MAY field in a first step, then fill it, then make it a MUST, then use the modifyDn to change the DN of all users. Would this work?
Any input on this?
If it can help, we use OpenDJ for the LDAP server.