我是 python 和 ldap3 模块的新手。但是我想在特定的 OU 中创建一个 AD 组。如何才能做到这一点?
# import class and constants
from ldap3 import Server, Connection, ALL
# define the server
s = Server('servername', get_info=ALL) # define an unsecure LDAP server,
# define the connection
c = Connection(s, user='user_dn', password='user_password')
ou = "OU=Staff,OU=RU,DC=DOMAIN,DC=LOCAL"
groupname="ADM_Local"
description="local group for access to IPA"
如何ADM_Local
在定义的 ou 中添加组并将描述添加到组中?该文档没有说明它是如何完成的:https ://ldap3.readthedocs.io/tutorial_operations.html#create-an-entry