How do I query the security attributes for an AD object ...
Richard Sharpe
realrichardsharpe at gmail.com
Fri Apr 15 23:10:27 UTC 2016
On Fri, Apr 15, 2016 at 1:40 PM, Richard Sharpe
<realrichardsharpe at gmail.com> wrote:
> Hi folks,
>
> How can I query the security attributes associated with an account in
> LDAP ... permissions etc?
To respond to my own query:
import ldap
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, 0)
ldap_connection=ldap.initialize("ldap://some-dc.somedom1.domedom2.blah.com")
ldap_connection.simple_bind_s("somedom\\administrator", "somepassword")
res = ldap_connection.search_s("CN=Computers,DC=somedom1,DC=somedom2,DC=dom1,DC=dom2,DC=com",
ldap.SCOPE_SUBTREE, "(cn=some-name)",['nTSecurityDescriptor'])
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
More information about the samba-technical
mailing list