Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to a add a functiion in my existing web service to apply the 'Allow to Authenticate' rule to a computer. This has been a manual process in the past done with a PowerShell script we need to convert this to C#.

The allowed to authenticate is an extended right.
You can set it using System.DirectoryServices.ActiveDirectoryAccessRule formatted like:
JavaScript
System.DirectoryServices.ActiveDirectoryAccessRule($TrusteeSID,"ExtendedRight",$AccessControlTypeAllow,$Allowed2AuthGUID)
// Where:
$Allowed2AuthGUID =68b1d179-0d15-4d4f-ab71-46152e79a7bc
$AccessControlTypeAllow= [System.Security.AccessControl.AccessControlType]::Allow
$trusteeSID= <sid of the user being granted the right>


I have searched the web and cannot find anyone doing this in C#. I'm hoping someone out there can help. I can use Visual Basic code as well. Any help or pointers appreciated.

Thanks!
Posted
Updated 11-Apr-22 16:59pm
v2
Comments
Sergey Alexandrovich Kryukov 1-Jan-13 22:03pm    
This is not translation service, sorry. What would prevent you from doing it by yourself? Where did you stuck? This is a Questions & Answers forum.
—SA

1 solution

See if this sample of FileSystemAccessRule helps you look into the right way: http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemaccessrule.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900