|
|
@ -61,6 +61,7 @@ def main(): |
|
|
|
exit(0) |
|
|
|
z_users = z_reader.users_make_zayavka(res) |
|
|
|
# print len(z_users) |
|
|
|
i = 0 |
|
|
|
for z_user in z_users: |
|
|
|
print z_user, z_users[z_user]['memberOf'] |
|
|
|
ad_user = UserAd(sam, base, domainName, z_users[z_user]['samAccountName'], z_users[z_user]['usrPass']) |
|
|
@ -84,7 +85,9 @@ def main(): |
|
|
|
ad_user.disable() |
|
|
|
for group in z_users[z_user]['memberOf']: |
|
|
|
ad_user.add_in_group(group) |
|
|
|
break |
|
|
|
if i > 10: |
|
|
|
break |
|
|
|
i += 1 |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|