zakird / pyad

Python Active Directory Tools | *Not actively maintained*
http://zakird.github.io/pyad/
176 stars 72 forks source link

Create the same group on different container fail #30

Closed eric-lich closed 10 years ago

eric-lich commented 10 years ago

Steps,

  1. Create group1 in Users container
  2. Create group1 in Computers container Error show: Traceback (most recent call last): File "C:\CA\Library\ad\group.py", line 124, in add_group_object('group1','Computers ') File "C:\CA\Library\ad\group.py", line 121, in add_group_object adgroup.ADGroup.create(group_cn,container) File "C:\Python27\lib\site-packages\pyad\adgroup.py", line 12, in create optional_attributes=optional_attributes) File "C:\Python27\lib\site-packages\pyad\adcontainer.py", line 62, in create_group pyadutils.pass_up_com_exception(e) File "C:\Python27\lib\site-packages\pyad\pyadutils.py", line 52, in pass_up_com_exception raise WIN32_ERRORS.get(info['error_num'], win32Exception)(error_info=info, additional_info=additional_info) pyad.pyadexceptions.win32Exception: 0x80071392: The object already exists.

Coding: adgroup.ADGroup.create('group1','Users') adgroup.ADGroup.create('group1','Computers')

eric-lich commented 10 years ago

Sorry, it's my fault. If all the attributes are the same, we could not create it successfully.