Bug 9420 - incorrect "objectclass: cannot re-add an existing objectclass" error
incorrect "objectclass: cannot re-add an existing objectclass" error
Status: NEW
Product: Samba 4.0
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB
unspecified
All All
: P5 normal
: ---
Assigned To: Andrew Bartlett
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
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!