Hello,
I want to have an ability add "custom attribute[s]" to my LDAP records. For example, such an attribute could be sipTelephone, mobile and/or something else.
I did a little digging. Please advise whether I am on the right track.
My understanding, at present, is that I would have to modify core.schema [located on my Ubuntu under /etc/ldap/schema ] and perhaps some other schema files from the same directory.
I found various syntax OIDs. For telephones, for example - 1.3.6.1.4.1.1466.115.121.1.50 should be the right one. There is another OID for strings - 1.3.6.1.4.1.1466.115.121.1.15 for UTF-8 coded strings.
Is editing core.schema the correct way to go? I am eagerly looking for advice.
Thank you for reading my question this far. I have been saved twice by people on this list. Appreciate your help very much.
Sincerely,
Igor Shmukler
--On Tuesday, December 02, 2014 10:55 PM +0200 Igor Shmukler igor.shmukler@gmail.com wrote:
Never, ever, edit core.schema.
You can apply for your own OID, create your own attributes, and then create objectClasses that use them. That is the correct way to do things.
--Quanah
--
Quanah Gibson-Mount Server Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
Igor Shmukler wrote:
Answered not so long ago:
http://www.openldap.org/lists/openldap-technical/201411/msg00186.html
Ciao, Michael.
I thought a schema having a OID is the same everywhere; would a modified schema need a new OID then?
Igor Shmukler igor.shmukler@gmail.com schrieb am 02.12.2014 um 21:55 in
Nachricht CAA1SNA0yKTLdMnzNn1wpngxkdcEgePY4_ZPpKO2+5SPRjdWTxg@mail.gmail.com:
Ulrich Windl wrote:
I thought a schema having a OID is the same everywhere; would a modified schema need a new OID then?
Yes.
Modifying RFC-published schema is prohibited anyway.
Ulrich Windl wrote:
I thought a schema having a OID is the same everywhere; would a modified schema need a new OID then?
Best practice is to assign a new OID if anything changes for a schema element.
99.9999% of LDAP client applications don't care about OIDs though. => assign a new NAME too
Ciao, Michael.
Hello Everybody,
Thank you for answering my question. I am still confused...
If schema files are never used directly, while LDIFs are used instead; why is there no tool which produces LDIF files suitable for ldapadd(1) or/and ldapodify(1)? Is it recommended to run a schema to LDIF conversion, then to manually edit the LDIF file[s]?
I tried to add one optional attribute - ipPhone. Made a schema (dummy) then converted to below file:
dn: cn=dummy,cn=schema,cn=config changetype: add objectClass: olcSchemaConfig cn: dummy dn: cn=dummy,cn=schema,cn=config
changetype: modify #changetype: add add: olcAttributeTypes olcAttributeTypes: {0}( 1.3.6.1.4.1.4203.666.100.123 NAME 'ipPhone' DESC 'ip telephone internal or routable number' SUP telephoneNumber ) - add: olcObjectClasses olcObjectClasses: {0}( 1.3.6.1.4.1.4203.666.100.1 NAME 'dummyPerson' DESC 'Dummy-server user' SUP inetOrgPerson STRUCTURAL MAY ipPhone )
Is this right?
Sincerely,
Igor Shmukler
On Tue, Dec 9, 2014 at 5:31 PM, Michael Ströder michael@stroeder.com wrote:
--On Tuesday, December 09, 2014 6:31 PM +0200 Igor Shmukler igor.shmukler@gmail.com wrote:
LDIF is LDIF.. I.e., it's a standard. You can write a tool if you see fit, I suppose?
Is it recommended to run a schema to LDIF conversion, then to manually edit the LDIF file[s]?
That is a possible method to use. I personally don't do that. We have a tool @ zimbra that auto-generates our schema from an XML input.
Did it work? Or did you get an error?
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration
openldap-technical@openldap.org