-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protect from Accidental Deletion #39
Comments
hi @isaiahh1013 ! so you'll obviously want to create a session, then you'll want to use the function so you'll need to create the OU first, and then read and modify the security descriptor afterwards. when you're creating an OU directly in the interface on a domain controller, the checkbox for "protect from accidental deletion" will modify the default security descriptor at creation time. once you create the OU, you can get its security descriptor using now, I haven't actually created helpers specifically for DENY ACEs, and I apologize for that. they're not super commonly used, but I'll add helpers for them in the future. then you can prepand that ace to the DACL of the sorry this isn't simpler - ACLs in active directory are inherently fairly complex. if you want me to review your code once you implement the above, feel free to post it in this thread and I can take a look. |
Thank you so much! I will see if I can implement this in code. This is my first time touching the security descriptors so we will see if I can get this to work. Will you let me know if this is implemented in this library? I would be glad to test |
@zorn96 Currently, I am struggling to create an ADSession. What I currently have is: session = ADSession(ldap_connection=conn, domain='domain.com') The error that shoots out is failing on line 113 in ad_session.py: 'str' object has no attribute 'get_domain_dns_name' |
Disregard, I forgot to create an ADDomain object. However, I'm not finding a function called create_ace_for_allow_access(). Could you clarify where to find this? |
|
Thank you @zorn96! I will continue to work on my code next week to see if I can officially pull this off. Your module seems to be very well written. I would like to keep issue open in the event I have issues. The current issue I'm having is calling the deny ace function you have. It's asking for an access mask object to which I love tried but fail to do. Could you give me an example of how to use it? |
Hi @zorn96 ! I tried coding up your process that you sent me, however I'm having trouble now setting the descriptor. Do you by chance have any code I can mock to create this process? I'm stuck at the part for setting the ace on the OU after I prepended the new ACL. Also, how would I pull your dev branch? Thank you! |
Hi @zorn96 . I managed to get this to work. Do you have an eta on when this could be pushed to main branch? |
Hi @isaiahh1013, would you please share a code sample to view the status of this property |
This thread is still unresolved. We got close, but no solution yet. |
Hi! I’ve tried looking through the docs but could figure how to set any security descriptors. What
I’m trying to do specifically is protect an OU from accidental deletion. Any assistance appreciated!
The text was updated successfully, but these errors were encountered: