Hi,
I'm trying to add an 'olcAttributeType' to an already existing LDAP schema. I wrote this LDIF, which was wrong as it turns out:
| dn: cn=schema,cn=config | changetype: modify | add: olcAttributetypes | olcAttributetypes: ( bitHttpAttribute:26.2008.07.29.1 NAME | 'testEntry' DESC 'Test' EQUALITY integerMatch SYNTAX | LDAPInteger SINGLE-VALUE )
This changed my 'dn: cn=schema,cn=config' from: | dn: cn=schema,cn=config | objectClass: olcSchemaConfig | cn: schema | structuralObjectClass: olcSchemaConfig | entryUUID: 9faa0e66-41f5-1032-82e1-974d55020d34 | creatorsName: cn=config | createTimestamp: 20130425131311Z | entryCSN: 20130425131311.204787Z#000000#000#000000 | modifiersName: cn=config | modifyTimestamp: 20130425131311Z
To: | dn: cn=schema,cn=config | objectClass: olcSchemaConfig | cn: schema | structuralObjectClass: olcSchemaConfig | entryUUID: 9faa0e66-41f5-1032-82e1-974d55020d34 | creatorsName: cn=config | createTimestamp: 20130425131311Z | olcAttributeTypes: {0}( bitHttpAttribute:26.2008.07.29.1 NAME | 'testEntry' DESC 'Test' EQUALITY integerMatch SYNTAX | LDAPInteger SINGLE-VALUE ) | entryCSN: 20220525132055.795116Z#000000#000#000000 | modifiersName: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth | modifyTimestamp: 20220525132055Z
Which is not what i wanted but it happened, so now i want it gone. But it seems i can't remove that olcAttributeTypes entry?
This LDIF won't work: | dn: cn=schema,cn=config | changetype: modify | delete: olcAttributeTypes
Yielding: | # ldapmodify -Y EXTERNAL -H ldapi:/// -f kak.ldif | [..] | modifying entry "cn=schema,cn=config" | ldap_modify: Other (e.g., implementation specific) error (80)
When i put in the exact olcAttributeType line i want to remove (instead of all of 'em) like this: | dn: cn=schema,cn=config | changetype: modify | delete: olcAttributeTypes | olcAttributeTypes: ( bitHttpAttribute:26.2008.07.29.1 NAME 'testEntry' DESC 'Test' EQUALITY integerMatch SYNTAX LDAPInteger SINGLE-VALUE )
Now the same ldapmodify command yields: | # ldapmodify -Y EXTERNAL -H ldapi:/// -f kak.ldif | [..] | modifying entry "cn=schema,cn=config" | ldap_modify: Operations error (1)
Can anyone explain what i am doing wrong and how to revert my change to the 'cn=schema,cn=config' dn?
Thanks a bunch!
Regards, -Sander.
--On Wednesday, May 25, 2022 5:28 PM +0200 Sander Smeenk ssmeenk@freshdot.net wrote:
Hi,
I'm trying to add an 'olcAttributeType' to an already existing LDAP schema. I wrote this LDIF, which was wrong as it turns out:
What OpenLDAP release are you running?
This LDIF won't work: | dn: cn=schema,cn=config | changetype: modify | delete: olcAttributeTypes
Try:
dn: cn=schema,cn=config changetype: modify delete: olcAttributetypes olcAttributetypes: {0}
--Quanah
Quoting Quanah Gibson-Mount (quanah@fast-mail.org):
I'm trying to add an 'olcAttributeType' to an already existing LDAP schema. I wrote this LDIF, which was wrong as it turns out:
What OpenLDAP release are you running?
Ah, yes, that might be relevant. I'm working with 2.5.11 (Ubuntu Jammy) right now. But this LDAP server is running since ~2007. Took me WAY more time than anticipated to convert from 'bdb' to 'mdb', but hey, we're here...
Try: dn: cn=schema,cn=config changetype: modify delete: olcAttributetypes olcAttributetypes: {0}
No dice.
ldap_modify: Operations error (1) additional info: <olcAttributeTypes> missing <attribute> argument
--On Wednesday, May 25, 2022 10:28 PM +0200 Sander Smeenk ssmeenk@freshdot.net wrote:
Quoting Quanah Gibson-Mount (quanah@fast-mail.org):
I'm trying to add an 'olcAttributeType' to an already existing LDAP schema. I wrote this LDIF, which was wrong as it turns out:
What OpenLDAP release are you running?
Ah, yes, that might be relevant. I'm working with 2.5.11 (Ubuntu Jammy) right now. But this LDAP server is running since ~2007. Took me WAY more time than anticipated to convert from 'bdb' to 'mdb', but hey, we're here...
If nothing else, you should be able to stop the server, export via slapcat, delete the offending line, and re-import it with slapadd.
--Quanah
openldap-technical@openldap.org