Le 02/08/2016 à 15:32, Côme Chilliet a écrit :
Hello,
I’m trying to modify an LDAP node to change its objectClasses:
dn: cn=canon-c5250,ou=printers,ou=systems,dc=xxx,dc=xxx
cn: canon-c5250
description:: Q2Fub24gSVIgQURWIEM1MjUwIA==
labeledURI: ipp://127.0.0.1
ipHostnumber: 127.0.0.1
macAddress: 12:12:12:12:12:12
objectClass: top
objectClass: gotoPrinter
I want to remove gotoPrinter objectClass which is flagged as OBSOLETE and instead use fdPrinter, ipHost and ieee802Device.
I try with an ldif with the following content:
dn: cn=canon-c5250,ou=printers,ou=systems,dc=xxx,dc=xxx
changetype: modify
replace: objectClass
objectClass: fdPrinter
objectClass: ieee802Device
objectClass: ipHost
objectClass: top
I get:
ldapadd -D cn=admin,dc=xxx,dc=xxx -f modify.ldif -W
ldap_modify: Object class violation (65)
How can I get more information? I don’t know which violation that could be, as I am able to insert a second object with no problem which looks like what I want:
dn: cn=test-print,ou=printers,ou=systems,dc=xxx,dc=xxx
changetype: add
cn: test-print
description: test
labeledURI: ipp://127.0.0.1
ipHostnumber: 127.0.0.1
macAddress: 12:22:12:12:22:22
objectClass: fdPrinter
objectClass: ieee802Device
objectClass: ipHost
objectClass: top
Here are the classes definitions:
objectclass (1.3.6.1.4.1.10098.1.2.1.31 NAME 'gotoPrinter'
DESC 'GOto - Gonicus Terminal Concept, objectclass' SUP top STRUCTURAL
OBSOLETE
MUST ( cn )
MAY ( labeledURI $ description $ l $ gotoPrinterPPD $ macAddress $ ipHostNumber $ gotoUserPrinter $
gotoUserAdminPrinter $ gotoGroupPrinter $ gotoGroupAdminPrinter $
printerWindowsInfFile $ printerWindowsDriverDir $ printerWindowsDriverName) )
objectclass ( 1.3.6.1.4.1.38414.16.2.5 NAME 'fdPrinter'
DESC 'FusionDirectory printer class'
MUST ( cn )
MAY ( labeledURI $
fdPrinterWindowsInfFile $ fdPrinterWindowsDriverDir $ fdPrinterWindowsDriverName $
fdPrinterUsers $ fdPrinterAdminUsers))
Hello,
you can't replace the default structural objectClass of an object (this objectClass is listed in structuralObjectClass operational attribute). You can do it with the relax extension if needed, else, simply remove and add the entry.