473,800 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to read ACLs in AD with dotnet managed C# ?

I want to do the folllowing in C# :
I have a DirectoryEntry :
DirectoryEntry usr = new DirectoryEntry( "LDAP://cn=Mike,ou=User s,dc=MyDc");

With "AD Users & Computers" Security tab an administrator had give to some
users the right to write the accountExpires property of this Account.
I want to read the ACLs on this object and obtain the list on the users who
have this right.
How can i do ?

Thanks
Christian

Apr 1 '08 #1
1 2191
Use the ObjectSecurity property to access the security descriptor as a .NET
managed type.

Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Christian from France" <Christian from Fr****@discussi ons.microsoft.c om>
wrote in message news:0A******** *************** ***********@mic rosoft.com...
>I want to do the folllowing in C# :
I have a DirectoryEntry :
DirectoryEntry usr = new
DirectoryEntry( "LDAP://cn=Mike,ou=User s,dc=MyDc");

With "AD Users & Computers" Security tab an administrator had give to some
users the right to write the accountExpires property of this Account.
I want to read the ACLs on this object and obtain the list on the users
who
have this right.
How can i do ?

Thanks
Christian

Apr 1 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2073
by: Daniel Cayouette | last post by:
in C# is there a managed code example to set ACLs on a folder. We're currently using the win32api and would like to migrate this functionality to managed code in C#
2
2969
by: assi | last post by:
Hello all We are developing a large dotnet application, which includes ~ 120 assemblies. (total size of all binaries is ~ 20MB). Our application also references the following dotnet assemblies: System,System.XML, System.Windows.Forms, System.Drawing, System.Data, System.Design. We use dotnet framework 1.1 During initialization, the application scans a directory and loads the assemblies (using Assembly.LoadFrom). It then scans all...
1
2991
by: Brian Patterson | last post by:
Hi - I'm trying to manually read and parse Machine.Config. When I try this I recieve the following error: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\" is denied. I am doing this by first getting the directory location of the framework and passing it to a DirectoryInfo object. I can then use this object to move to the Config folder. I suspect I only need to demand a permission in my code but I'm not quite sure...
0
1142
by: Sherwood | last post by:
My current scenario is users logging in to our website and being directed to a specific directory based on who they are. The ACLs on the destination result in prompts for credentials (the windows popup dialog). I'm using basic windows authentication with https to protect the username and password. I'd like to have a nicer login UI using Forms authentication against the AD, but would still like to use ACLs to control resource access. ...
2
1684
by: dusanv | last post by:
Hi, I'm starting a new project and am still torn deciding whether to go with MFC or to do it in C++/CLI with dotnet. The app makes extensive use of C++ native libraries which cannot go managed (closed source) and will have a whole pile of UI. Dotnet is way easier for UI than MFC but it doesn't compile to native. How much of a speed hit is dotnet UI and converting back and forth between String^ and std::string*? Do the MSIL obfucsators...
1
1492
by: Jose Cintron | last post by:
My appologies if this shows twice (I forgot to include a subject the first time) I'm looking for a way to obtain the ACL for a specific registry key. What I need is something that works in a similar way to the following for file ACLs Set wmiSecuritySettings = wmiServices.Get ("Win32_LogicalFileSecuritySetting.Path='" & fname & "'") intRetVal = wmiSecuritySettings.GetSecurityDescriptor(wmiSecurityDescriptor)
3
1047
by: =?Utf-8?B?QXJnaXJvcA==?= | last post by:
I need to include some xml files with my windows form application. These files are user as read-only by the application. Furthermore the user should not be able to modify them (idealy should be hidden for him/her). What is the best method to do this?
3
2410
by: Laura | last post by:
Hi: ¿How can I read a file on the client side without loading it to the server?
66
3381
by: John | last post by:
Hi What are the advantages actually achieved of managed code? I am not talking of theory but in reality. Thanks Regards
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10253
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6811
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.