| Newsgroups |
gmane.comp.lang.perl.modules.ldap |
| Message-ID |
<[email protected]> |
OK I finally got it, here is a summary of what I tried and what worked:
$mesg = $obj->modify($dn,
changes => [
delete => [ 'ipHostNumber','objectclass' => [ 'ipHost' ]]
]
);
17 - The request contains an undefined attribute type
$mesg = $obj->modify($dn,
changes => [
delete => [ 'ipHostNumber' ],
delete => [ 'objectclass' => [ 'ipHost' ]]
]
);
16 - The request referenced an attribute that does not exist
$mesg = $obj->modify($dn,
changes => [
delete => [ 'ipHostNumber' => [] ],
delete => [ 'objectclass' => [ 'ipHost' ]]
]
);
no error
$mesg = $obj->modify($dn,
changes => [
delete => [ 'ipHostNumber' => [] ,'objectclass' => [ 'ipHost' ] ],
]
);
no error
Thank you for all your help!
On Dec 12, 2009 10:52pm, Justin Alcorn <[email protected]> wrote:
> Have you tried making sure to delete any attributes associated with
> that object class first?
> On 12/12/09, Kent [email protected]> wrote:
> > OpenLDAP 2.4.16 on CentOS 5.3
> > Perl version 5.10.0 on Ubuntu
> >
> > I Have this entry in LDAP:
> >
> > dn: cn=00-1E-52-76-B4-8A,ou=Devices,ou=Network,dc=mbl,dc=edu
> > cn: 00-1E-52-76-B4-8A
> > userPassword::
> > radiusExpiration: 2030123100:00:00
> > radiusCheckItem: 999993
> > radiusUserCategory: FIXED
> > description: Fred Mertz
> > macAddress: 00:1E:52:76:B4:8A
> > ipHostNumber: 128.128.164.100
> > objectClass: radiusprofile
> > objectClass: simpleSecurityObject
> > objectClass: device
> > objectClass: ieee802Device
> > objectClass: ipHost
> > radiusFilterId: Enterasys:version=1:policy=A-User
> >
> > I want to delete the objectClass 'ipHost' and attribute
> > 'ipHostNumber'. What is the perl code to do this? Everything I've read
> > is geared towards add/replace/delete attribute -> value but not
> > objectClass.
> >
> > $mesg = $obj->modify($dn,
> > changes => [
> > delete => [ 'objectclass' => [ 'ipHost' ]],
> > ]
> > );
> >
> > Returns:
> > error 65 - The request specifies a change to an existing entry or the
> > addition of a new
> > entry that does not comply with the servers schema
> >
> >
> >
> >
> >
> >
> --
> Sent from my mobile device