I want to share the example of manual efforts here.
I have already created a users and ad groups by having ldap connection binding using ldap3. I can see ldap3 supports automation for use cases like managing users and groups. But I want something different here.
Can we share file/directory by assigning permissions(Read/Write/Delete) to user/group using ldap3? If yes than How we can achieve that?
Right now I manually create the file and sharing with ad group by changing security settings manually but wanted to have pythonic way to do complete automation.
Any support in the same regards will be appriciated.
I trid to find relavent document but nothing helped really. https://ldap3.readthedocs.io/en/latest/
Here's an example using
ldap3and connection to AD usingSSLoverTLS. There are build in methods in ldap3 to accomplish exactly what you want to do:That's basically it. If you want to raise an error in the case that the adding/removing groups failed, you can set the
raise_errorto True inad_addandad_remove. The description says: raise_error: If the operation fails it raises an error instead of returning False