[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Can't modify with extended objectclass and required attributes



On Jul 5 at 9:33am, Mike Denka wrote:

> ldapmodify -x -h localhost -D cn=Manager,dc=mydomain,dc=com -W
> Enter LDAP Password:
> dn: uid=account,ou=people,dc=mydomain,dc=com
> changetype: modify
> add: objectclass
> objectclass: WidNetToS
> add: abc
> abc: 500
> add: def
> def: 500

You are not "adding" objectclass to the entry, you are replacing it and
along the way adding the value "WidNetTos" to the list of objectClasses
the entry already has.  You need to use the following:

dn: uid=account,ou=people,dc=mydomain,dc=com
changetype: modify
replace: objectclass
objectclass: Existing_oc_1
objectclass: Existing_oc_2
objectclass: ...
objectclass: WidNetToS
add: abc
abc: 500
add: def
def: 500

Where "Existing_oc_1, Existing_oc_2, and ..." are the objectclasses the
entry already has.

-- 
Frank Swasey                    | http://www.uvm.edu/~fcs
Systems Programmer              | Always remember: You are UNIQUE,
University of Vermont           |    just like everyone else.
                    === God Bless Us All ===