|
|
@ -9,6 +9,7 @@ from samba.auth import system_session |
|
|
|
import samba.param |
|
|
|
# import base64 |
|
|
|
# import binascii |
|
|
|
import time |
|
|
|
|
|
|
|
base = "CN=Users,DC=techgrow,DC=local" # можно не заморачиваться с ОУ и тогда base = "CN=Users,DC=myDom,DC=lan" |
|
|
|
domainName = 'techgrow.local' |
|
|
@ -147,7 +148,9 @@ def main(): |
|
|
|
test_usr = UserAd(sam, base, domainName, 'tst', "secret34daD") |
|
|
|
print test_usr.memberOf |
|
|
|
print "Set disable error: ", test_usr.disable() |
|
|
|
time.sleep(1) |
|
|
|
print "Set enable error: ", test_usr.enable() |
|
|
|
time.sleep(1) |
|
|
|
print "Set Password remove error: ", test_usr.remove() |
|
|
|
|
|
|
|
|
|
|
|