Bug 9420 - incorrect "objectclass: cannot re-add an existing objectclass" error
Summary: incorrect "objectclass: cannot re-add an existing objectclass" error
Status: NEW
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 02:09 UTC by Brian May
Modified: 2015-07-31 08:18 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian May 2012-11-22 02:09:24 UTC
I am sending, from Python, the following modify_s(dn, modlist) command:

dn
'CN=brian,CN=Users,DC=ad,DC=vpac,DC=org'

modlist
[(1, 'objectClass', None),
 (0,
  'objectClass',
  ['organizationalPerson',
   'top',
   'inetOrgPerson',
   'person',
   'user',
   'posixAccount']),
 (0, 'title', ['Destroyer']),
 (0, 'mail', ['None@vpac.org']),
 (0, 'givenName', ['Brian']),
 (0, 'gecos', ['Brian May']),
 (0, 'sn', ['May']),
 (0, 'homeDirectory', ['/home/None'])]


This gives me:

{'info': "0000200D: objectclass: cannot re-add an existing
objectclass: 'organizationalPerson'!", 'desc': 'Type or value exists'}

I believe the first item in the modlist should delete
the objectClass, so it shouldn't exist when it tries to add it again.
Or maybe the first delete isn't suppose to work for some reason?
Comment 1 Karolin Seeger 2013-12-10 15:41:03 UTC
Andrew, can you please comment or re-assign?
Thanks!